Link to home
Start Free TrialLog in
Avatar of Zach
ZachFlag for United States of America

asked on

Random Name Generator in Excel

I have a list of 500 employees in excel, and I need a formula to randomly generate a list of 10 employees out of the list of 500. I have found the formula below, but I found that then I tell it to return ten names sometimes it duplicates the names. Overall we have 500 employees and need to somehow randomly generate the list of 10 names out that list without duplicating.

The formula I tried - =INDEX($A$3:$A$10,RANDBETWEEN(1,COUNTA($A$3:$A$10)),1)
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Until someone comes up with a better solution, one easy workaround is to make ten subsets of the 500 employees and then select one random employee from each subset.
Avatar of Zach

ASKER

Maybe excel is not the right thing to produce this? Open to suggestions
You can easily achieve it with VBA if you are open to it.
Avatar of Zach

ASKER

not very familiar with VBA but I can try
try this link it looks like it could accomplish what you are looking for.  https://www.miniwebtool.com/random-name-picker/
The attached workbook assumes the names start in A3. Click the blue button.
29152481.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the feedback Zach! Glad it worked for you.