Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a set of 20 numbers in cell A1:T1
I'm using =INDEX($A1:$T1,RAND()*COUNTA($A1:$T1)) in cell W1 to Z1 to randomly select 4 numbers from my set. How would I modify my formula so as to not get any duplicate's? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See instructions at John McGimpsey's site.
http://www.mcgimpsey.com/excel/udfs/randint.html Either Excel worksheet functions or VBA............your choice Gord On Mon, 18 Jun 2012 11:52:08 -0700 (PDT), JAgger1 wrote: I have a set of 20 numbers in cell A1:T1 I'm using =INDEX($A1:$T1,RAND()*COUNTA($A1:$T1)) in cell W1 to Z1 to randomly select 4 numbers from my set. How would I modify my formula so as to not get any duplicate's? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 6/18/2012 12:29 PM, Gord Dibben wrote:
See instructions at John McGimpsey's site. http://www.mcgimpsey.com/excel/udfs/randint.html Either Excel worksheet functions or VBA............your choice Gord On Mon, 18 Jun 2012 11:52:08 -0700 (PDT), JAgger1 wrote: I have a set of 20 numbers in cell A1:T1 I'm using =INDEX($A1:$T1,RAND()*COUNTA($A1:$T1)) in cell W1 to Z1 to randomly select 4 numbers from my set. How would I modify my formula so as to not get any duplicate's? Thanks I have done this before using a listbox: fill the listbox with every possible number, then randomly select an entry in the listbox and use removeitem to remove it from the listbox so it can't be select twice. You can get as many entries as the listbox holds in random order with no possibility of duplicates, and the coding is very easy. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent, thanks
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Duplicates in Rand Formula | Excel Discussion (Misc queries) | |||
HELP with the RAND() Function......AGAIN!!!!! | Excel Worksheet Functions | |||
HELP with the RAND() Function!!!!!! | Excel Worksheet Functions | |||
Getting RAND() value but NOT its Function?!? | Excel Programming | |||
Rand function | Excel Worksheet Functions |