# How to create a random name picker

Hello All. Here is a quick step by step guide on how to create random name picker in excel. This is absolutely dynamic and random. We shall be using Choose & Randbetween functions to achieve this.

First let’s see the syntax for the choose function
=Choose(index_num, value1, value2,… value 254)
Here the index number will be a number between 1-254, based on number of value items. For example, if we have value1, value2, value3 and value4, then index_num should be either 1 or 2 or 3 or 4. Choose function would return the appropriate value based on the number given.
Let’s look at the our dataset and the initial formula below. In the above example, formula had the (index_num) as 7, hence it was returning the value “Zaheer”. If it was 12, it would return the value “Gautham”. So our Choose function is working as expected. But the aim is to get the names returned completely in random. So let’s replace the constant “index_num” with randbetween function.
Syntax for randbetween function: =randbetween(bottom,top)

Here bottom and top is nothing but the ranges between which the function would return a value from.
In our example, we have a total of 12 names. So let’s replace “index_number”, in our choose function, with the randbetween(1,12)

Final forumla would be:
=CHOOSE(RANDBETWEEN(1,12),\$A\$1,\$A\$2,\$A\$3,\$A\$4,\$A\$5,\$A\$6,\$A\$7,\$A\$8,\$A\$9,\$A\$10,\$A\$11,\$A\$12) To randomly choose the value, press F9 – this will recalculate the formula everytime. Alternatively, do any action in the sheet like copy something else, key in some values in any of the cells in the sheet etc – this will trigger randbetween function automatically.
Check here to find out how to generate random dates and here for random time values.
I hope you liked this quick tutorial and found it useful. Please let us know your valuable feedback that would help in improving the content. Thanks for reading.