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
Cell reference formula
=RANDBETWEEN(5,25-1)+RAND()
=RANDBETWEEN(B5,C5-1)+RAND()
|
GENERIC FORMULA
=RANDBETWEEN(lowest_num,highest_num-1)+RAND()
ARGUMENTS GENERIC FORMULA
=RANDBETWEEN(lowest_num,highest_num-1)+RAND()
ARGUMENTS 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 |
---|---|---|
Generate random number between two numbers | How to generate a random number between two specific numbers | |
Generate random numbers | How to generate random numbers between 0 and 1 |
RELATED FUNCTIONS
Related Functions | Description | Related Functions and Description |
---|---|---|
RANDBETWEEN Function | The Excel RANDBETWEEN function returns a random number between two specified numbers | |
RAND Function | The Excel RAND function returns a random number between 0 and 1 |