Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Random List Generation

I have a list of 500 dates in ColA. Is there an easy way to generate a random
list of 25 dates.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Random List Generation


You could put this formula in B1

=RAND() copied down to B500.

Then sort columns A and B by column B and use the first 25


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=544663

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Random List Generation

In B1 thru B500 enter:

=rand()

Then sort cols A&B by B.
Then select the first 25 items in column A
--
Gary's Student


"carl" wrote:

I have a list of 500 dates in ColA. Is there an easy way to generate a random
list of 25 dates.

Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Random List Generation

If you want your original dates untouched, copy column A into a new
worksheet. Enter this formula in B1 of the new worksheet:

=RAND()

and copy down. Then sort Columns A and B using B as the sort field.
Then just take the top 25 (or bottom 25, or 25 consecutive cells in the
middle somewhere) dates from this list.

Hope this helps.

Pete

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Random List Generation

Perhaps something like this:

For a list of dates in A1:A500

C1: =INDEX($A$1:$A$500,INT(RAND()*500))
Copy C1 down through C25
format those cells as dates

That will choose 25 random dates from the range A1:A500

To check if you have any duplicate dates listed....
D1: =SUMPRODUCT((C1:C25<"")/COUNTIF(C1:C25,C1:C25&""))
If that formula returns anything less than 25...there are duplicates..recalc.

Note: the RAND function is volatile and generates new numbers every time the
workbook recalculates. Consequently, the list of dates will also keep
changing.

If you would like to deal with a static set of dates, create a Pivot Table
based on the random date list. Since Pivot Tables create an internal cache of
the source data, the Pivot Table list will not change even if the random date
list keeps changing. Anytime you want to use a new list of random dates,
just refresh the Pivot Table data

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"carl" wrote:

I have a list of 500 dates in ColA. Is there an easy way to generate a random
list of 25 dates.

Thank you in advance.

Reply
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
Subtotals in a list Bagheera Excel Discussion (Misc queries) 9 May 20th 06 01:46 PM
How to use covar in random number generation? [email protected] Excel Discussion (Misc queries) 9 March 12th 06 07:42 PM
How do I create a random sample from a list? swrath Excel Worksheet Functions 1 December 23rd 05 03:32 PM
Random items from a list? arcngel Excel Discussion (Misc queries) 3 September 8th 05 06:04 PM
Random Timetable Generation Boris Excel Worksheet Functions 7 January 28th 05 04:03 AM


All times are GMT +1. The time now is 03:46 PM.

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

About Us

"It's about Microsoft Excel"