Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
One step-by-step approach: In a new worksheet enter into A2: =LEFT(MRO!$C2,2) and copy down to row 49400. Select cells B2:C1000 (assuming that 999 exceeds your count of different prefixes) and array-enter =lfreq(A2:A49400) Array-enter into D2:D31 (assuming that you have exactly 54 different prefixes and that you want to get 30 random values) =INDEX(B1:B55,uniqrandint(55)) and copy down to row 55. Enter into E2 =INT(RAND()*MATCH(D2,$B$2:$C$31,2,FALSE)+1) and copy down to E31 Finally enter into F2 =INDEX(MRO!$C$2:$C$49400,MATCH(D2,$B$2:$B$49400,FA LSE)+E2-1) and copy down to F31 My UDF's lfreq and uniqrandint you find at www.sulprobil.com. If you need help to identify the count of different prefixes automatically let me know. HTH, Bernd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can i set up rand or rand between to give only -1 or 1? | Excel Worksheet Functions | |||
Creating a formula using RAND | Excel Worksheet Functions | |||
array formula with duplicates | Excel Discussion (Misc queries) | |||
Formula to recognize Duplicates | Excel Worksheet Functions | |||
How do I write my formula to automatically regenerate a RAND () i. | Excel Worksheet Functions |