Generate random number between two numbers with decimals

This tutorial shows how to generate a random number between two numbers with decimals using the RANDBETWEEN and RAND functions

EXCEL FORMULA 1. Generate random number between two numbers with decimals with RANDBETWEEN and RAND functions

EXCEL

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

=RANDBETWEEN(lowest_num,highest_num-1)+RAND()

ARGUMENTS
lowest_num: The lowest number that the formula can randomly generate.
highest_num: The highest number that the formula can randomly generate.

GENERIC FORMULA

=RANDBETWEEN(lowest_num,highest_num-1)+RAND()

ARGUMENTS
lowest_num: The lowest number that the formula can randomly generate.
highest_num: The highest number that the formula can randomly generate.

EXPLANATION

This formula uses the RANDBETWEEN and RAND functions to generate a random number between two numbers with 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. In this example we are returning a random number between 5 and 25, with 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 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