Here, we will learn how to use the Excel math functions: RAND and RANDBETWEEN.
RAND function
The Excel RAND function returns a random number between 0 and 1. For example, the formula =RAND() returns a number like 0.799610611 in my case. Note that this function recalculates when the worksheet is opened or changed. The function can be found in all the versions of Excel. RAND takes no arguments.
The formula in A4, copied down, is:
=RAND()
RANDBETWEEN function
The Excel RANDBETWEEN function returns a random integer between two given numbers. For example, the formula =RANDBETWEEN(1,10) returns the number 10 in my case. Note that this function recalculates when the worksheet is opened or changed. The function can be found in all the versions of Excel. RANDBETWEEN takes the arguments like this: (bottom, top), all of which are required. Bottom accepts an integer representing the lowest value, and top accepts an integer representing the highest value.
The formula in E4, copied down, is:
=RANDBETWEEN(C4,D4)
You have successfully learnt how to use the Excel math functions: RAND and RANDBETWEEN.