How do I set up a random name generator in excel

grich962

New Member
Joined
Apr 2, 2007
Messages
25
I need a formula that generates random names that i have in column a (a2:a30)
I need the name to be in b1 to j1 there can't be any duplicate names
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
=concatenate(char(int(rand()*26)+65),char(column()+64),char(int(rand()*26)+65),char(int(rand()*26)+65),char(int(rand()*26)+65),char(int(rand()*26)+65),char(int(rand()*26)+65),char(int(rand()*26)+65),char(row()+64),char(int(rand()*26)+65))
 
Upvote 0
Hi,

So you need to select random names from a2:a30

You will need an additional column to do this using formulas...

Assuming you can use column B, hide it and use C as your output column, do the following:

B1 copied down


Code:
=RAND()

and the formula in C1 copied down

Code:
=INDEX($A$1:$A$30,RANK(B1,$B$1:$B$30))

HTH
Ian
 
Upvote 0
I need a formula that generates random names that i have in column a (a2:a30)
I need the name to be in b1 to j1 there can't be any duplicate names
Try this...

Cell A1 must not contain one of the names that is in the range A2:A30.

Enter this array formula** in B1 and copy across to J1:

=INDEX($A2:$A30,SMALL(IF(ISNA(MATCH($A2:$A30,$A1:A1,0)),ROW(INDIRECT("1:29"))),INT(RAND()*(29-COLUMNS($A1:B1)+COLUMN($B1)))+1))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,575
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top