Generate Random time based on given time.

Kim Wilkins

New Member
Joined
Sep 18, 2014
Messages
1
How can I generate a random time based on a given time thats within plus or minus a set amount of time, say 30 minutes before or after. For example, I have a cell which contains the time 15:30:00. I want to generate a random time that is based on that cell and can be anywhere between 15:00:00 and 16:00:00. Is this possible in excel? Thanks for the help.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How about this with your time in A1:

=RANDBETWEEN(((A1-"00:30:00")*100),((A1+"00:30:00")*100))/100
 
Upvote 0
Or even this without the bonus brackets!

=RANDBETWEEN((A1-"00:30:00")*100,(A1+"00:30:00")*100)/100
 
Upvote 0
Or

=A1+(RAND()-0.5)/24

Of, if you want whole minutes,

=A1+RANDBETWEEN(-30,30)/1440
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,727
Messages
6,126,515
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top