Generate random number between two numbers with two decimal places

This tutorial shows how to generate a random number between two numbers with 2 decimal places using the ROUND, RANDBETWEEN and RAND functions

EXCEL FORMULA 1. Generate random number between two numbers with two decimal places with ROUND, RANDBETWEEN and RAND functions

EXCEL

Hard coded formula
Generate random number between two numbers with two decimal places
Cell reference formula
Generate random number between two numbers with two decimal places
=ROUND(RANDBETWEEN(5,25-1)+RAND(),2)
=ROUND(RANDBETWEEN(B5,C5-1)+RAND(),2)
GENERIC FORMULA

=ROUND(RANDBETWEEN(bottom_num,top_num-1)+RAND(),2)

ARGUMENTS
bottom_num: An integer number that represents the smallest value that the formula can return.
highest_num: An integer number that represents the highest value that the formula can return.

GENERIC FORMULA

=ROUND(RANDBETWEEN(bottom_num,top_num-1)+RAND(),2)

ARGUMENTS
bottom_num: An integer number that represents the smallest value that the formula can return.
highest_num: An integer number that represents the highest value that the formula can return.

EXPLANATION

This formula uses the ROUND, RANDBETWEEN and RAND functions to generate a random number between two numbers with two decimal points.
The RANDBETWEEN function is used to return a random integer number between two specific numbers. The bottom number is applied as is, however the formula subtracts 1 from the top number given that we add on a number derived from the RAND function, which returns a random decimal or integer number between 0 and 1. Finally, the formula uses the ROUND function, with a number of digits criteria set to 2 to round the random number generated through a combination of the RANDBETWEEN and RAND function. This will return a random number between the set range, with two decimal places. In this example we are returning a random number between 5 and 25, with two decimal points.

Click on either the Hard Coded or Cell Reference button to view the formula that has the bottom and top numbers directly entered into the formula or referenced to specific cells.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to generate a random number between two specific numbers
How to generate a random number between two numbers with decimals
How to generate random numbers between 0 and 1

RELATED FUNCTIONS

Related Functions Description Related Functions and Description
The Excel RANDBETWEEN function returns a random number between two specified numbers
The Excel RAND function returns a random number between 0 and 1
The Excel ROUND function returns a rounded number in accordance with the specified number of digits