I have a list of 500 names in CSV, i want to have a visual basic graphic code or a macro that can help me select 5 winners of these
I have a list of 500 names in CSV, i want to have a visual basic graphic code or a macro that can help me select 5 winners of these
=INT(RAND()*(500-1)+1)
copied into 5 cells could do it
F9 to change
Last edited by Russell Dawson; 04-04-2012 at 04:08 AM.
If I helped, please don't forget to add to my reputation. (click on the star below the post)
If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.
Failure is not falling down but refusing to get up.
hi, when i copy that they are times when i get duplicates, how do i avoid this, plus i need the results of each F9 return to be stored somewhere
Not sure to be honest. To do it fully I as you state I would expect you need some VBA. It's probably best to retitle your question "VBA for random generator" and move it to the "Excel programming" forum.
use rand .then unique rank the rand. then match 1,2,3,4,5 in an index heres an excample with just the first 50 names ,extend to 500 in yours
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks