Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi, I'd like to generate 4 different numbers from 1 to 50 but EXCLUDING
numbers 3 and 24. Your help is greatly appreciated! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
There are several ways. One way is to use two columns: In column K:K
(say starting from K2) you enter all the admissible numbers. Then, one column before, type 0 in J2 and then in J3 type =J2+1/48 and copy all the way to J49. Then, to generate random numbers use: =VLOOKUP(RAND(), $J$2:$K$49,2) This will produce your numbers with equal probability. Another, not so precise formula: =IF(RAND()<2/48, 1+INT(RAND()*2), IF(RAND()<20/48, 4+INT(RAND()*20), 25+INT(RAND()*26))) HTH Kostis Vezerides |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"dojistar" wrote
.. I'd like to generate 4 different numbers from 1 to 50 but EXCLUDING numbers 3 and 24. Another play to try .. List the numbers 1 - 50 into A1:A48, skipping 3 and 24 Put in B1: =RAND() Copy B1 down to B48 Put in C1: =INDEX(A:A,RANK(B1,$B$1:$B$48)) Copy C1 down to C4 C1:C4 will return what's required Just press F9 to regenerate -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to generate a list of randomly selected numbers within a range | Excel Worksheet Functions | |||
GENERATE RANDOM NUMBERS BUT EXCLUDE A NUMBER IN THE SEQUENCE | Excel Discussion (Misc queries) | |||
How do I generate random lottery numbers in Excel? | Excel Worksheet Functions | |||
generate consecutive numbers | New Users to Excel | |||
generate random numbers | Excel Worksheet Functions |