Tell me how to generate a random number in the range from 0 to 10, where each number will correspond to a name, and depending on what number falls out, you need to put it in the table field and assign a name, that is, if 1 falls out, then in the table field for example, Misha, if 2, then Vasya and so on?

Thank you in advance.

    1 answer 1

    Create an array with 11 names, generate a number from 0 to 10 Int(11 * Rnd()) and get the name from the array using the generated number as an index