#1   Report Post  
Tiffany
 
Posts: n/a
Default Random Times

I need to generate random times of the day between 6am and 6pm. They cannot
be any more than 55 minutes apart. And cannot be between 10:00 am and 10:30
am. I have tried everything I know and cannot come up with anything. Anyone
know of a function I can use to produce this automatically every day?
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Tiffany,

In Cell A1, enter "Random Times"
In Cell A2, enter

6:00:00 AM

In cell A3, enter the formula:

=A2+RAND()*55/1440

and copy down for 30 or 40 rows.

Then in cell B1, enter the "Use"

In cell B2, enter the formula

=AND(NOT(AND(A2=TIMEVALUE("10:00:00"),A2<=TIMEVAL UE("10:30:00"))),A2<TIMEVA
LUE("6:00:00 PM"))

and copy down to match column A.

Then apply a filter to the table, and select the dropdown for column B, and
select "TRUE"

HTH,
Bernie
MS Excel MVP


"Tiffany" wrote in message
...
I need to generate random times of the day between 6am and 6pm. They

cannot
be any more than 55 minutes apart. And cannot be between 10:00 am and

10:30
am. I have tried everything I know and cannot come up with anything.

Anyone
know of a function I can use to produce this automatically every day?



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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM
Selecting at random with weighted probability Damage Excel Worksheet Functions 2 January 31st 05 11:06 PM
SUMPRODUCT ON TIMES Bob Phillips Excel Worksheet Functions 1 January 13th 05 05:28 PM
Formulas stop calculating at random times when editing a few spreadsheets. Luke MacNeil Excel Discussion (Misc queries) 3 November 30th 04 03:21 PM


All times are GMT +1. The time now is 08:58 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"