LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 92
Default Duplicates in Rand Formula

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i set up rand or rand between to give only -1 or 1? Uesiet Excel Worksheet Functions 8 October 27th 08 02:28 PM
Creating a formula using RAND hbb2699 Excel Worksheet Functions 2 June 15th 06 05:53 PM
array formula with duplicates JR573PUTT Excel Discussion (Misc queries) 0 February 16th 06 09:18 PM
Formula to recognize Duplicates Spike9458 Excel Worksheet Functions 5 January 13th 06 06:36 PM
How do I write my formula to automatically regenerate a RAND () i. Regi Excel Worksheet Functions 1 December 8th 04 10:06 PM


All times are GMT +1. The time now is 10:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"