Go Back

How to Get Random Times at Specific Intervals in Excel

Read time: 20 minutes

Figure 1. Random Times at Specific Intervals in Excel.

Let’s say we have to come up with random times within specific intervals in Excel, we must utilize the RAND and FLOOR functions.

Generic Formula


The Excel RAND and FLOOR Formula requires no input parameters to generate random decimal numbers from time intervals between 0 and 1.

How to use the RAND and FLOOR functions in Excel.

Simple numbers are used to define Excel dates, Where 1 = 1 day.

Therefore, we can simply the decimal value of time by 1 to obtain a value which corresponds to time as Excel sees it.

Follow the 2 simple steps discussed below to observe how we apply the RAND and FLOOR functions.

  1. In our worksheet example below the RAND and FLOOR formula we have entered into cell A2 is as follows;


Figure 2. Random Times at Specific Intervals in Excel.

In our worksheet example above, RAND() generates a decimal number between 1 and 0, then the FLOOR Function proceeds to round that decimal number down to the nearest interval which are then expressed as recognized time intervals.

  1. Enter the RAND and FLOOR formula in cell A2 above into a few other cells in the RANDOM TIMES column to achieve other results.

Figure 3. Random Times at Specific Intervals in Excel.


Each time we enter the RAND and FLOOR formula, Excel will generate a random time within 15-minute intervals.

Instant Connection to an Expert through our Excelchat Service:

Our live Excelchat Service is here for you. We have Excel Experts available 24/7 to answer any Excel questions you may have. Guaranteed connection within 30 seconds and a customized solution for you within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

Hello, I am working with a large temperature data set which has data points at certain intervals apart. The time intervals change throughout the data set and I was wondering if there was any way I could bin the values so that they are averaged to every hour as opposed to the random intervals which they are at now? The Date Time data has a (M/D/YY H:M) setup
Solved by E. C. in 11 mins
Given a start and end time I need to call all the data between those two time points from a different sheet. I have to do this over 50 times with different time intervals. All of these 50 times taking place in a different category. I'd like to be able to input which category and the start and end times and be able to automatically output the values at between those times for that specific category.
Solved by B. J. in 20 mins
I have a time column (12:00 AM-11:30 PM it is at 1/2 intervals), I have start and end times for Supervisors. I need to find a formula that will help me find how many Supervisors work at all of the different intervals throughout the day. This would also include overnight. Please and thank you!
Solved by D. L. in 16 mins

Leave a Comment