Excel allows a user to get a random time using the TEXT and RAND functions. This step by step tutorial will assist all levels of Excel users in creating a random time generator.
Figure 1. The final result of the formula
Syntax of the RAND Function
The generic formula is:
=RAND()
The function has no parameters and returns a random number between 0 and 1.
Syntax of the TEXT formula
=TEXT(value, format_text)
The parameters of the TEXT function are:
- value – a value which we want to format
- format_text – formatting which we want to apply on the value.
Get a Random Time
We want to get a random decimal number between 0 and 1
The formula looks like:
=TEXT(RAND(), "HH:MM:SS")
The value parameter of the TEXT function is a random number as a result of the RAND function. The value parameter is “HH:MM:SS” which is the time format.
To apply the formula, we need to follow these steps:
- Select cell B3 and click on it
- Insert the formula:
=TEXT(RAND(), "HH:MM:SS")
- Press enter
Figure 2. Get a random time
Every time we press enter in formula cell, we will get a new time value in B3.
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.
Leave a Comment