EXCEL FUNCTIONS-RAND

Table of Contents

INTRODUCTION

RAND FUNCTION helps us to generate a random number.

Random number is used for creating some application where we need to create a random number.

Returns an evenly distributed random real number greater than or equal to 0 and less than 1.

A new number will be calculated every time the formula is refreshed or workbook is loaded.

PURPOSE OF RAND FUNCTION IN EXCEL

RAND FUNCTION returns the random real number between 0(including 0) and less than 1.

Rand function has a very simple but very important utility.

It simply generates the random numbers.

We can use this function in the applications when we need to generate the random numbers.

PREREQUISITES TO LEARN RAND

THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.

  •  Basic understanding of how to use a formula or function.
  •  Basic understanding of rows and columns in Excel.
  • Some information about the financial terms is an advantage for the use of such formulas.
  •  Of course, Excel software.

Helpful links for the prerequisites mentioned above What Excel does? How to use formula in Excel?



SYNTAX: RAND() FUNCTION IN EXCEL

The Syntax for the function is

=RAND()

There are no arguments passed into RAND FUNCTION as it only gives the output as a random number.

EXAMPLE: RAND FUNCTION IN EXCEL

DATA SAMPLE

SUPPOSE WE NEED TO CALCULATE A RANDOM NUMBER BETWEEN A AND B

We will be using the formula as =RAND()*(b-a)+a

Suppose we need to calculate a random number between 0 and 100. 

EXCEL:RAND FUNCTION ANIMATED EXAMPLE

STEPS TO USE RAND FUNCTION

The cell E8 is used to create random numbers.

The function used is

=ROUND(RAND()*100,0)

The function has been multiplied by 100 because RAND() will create a number with decimals.

So to round it off, we are using ROUND FUNCTION with number after decimal as 0.

Now whatever number is generated, it’ll be multiplied by 100 and it’ll be round off and we’ll get a random number between 0 and 1.

NUMBER OF DAYS CALCULATION

RAND() doesn’t create a whole number but a decimal number between 0 and 1.

If we need to create a random number between any two numbers, we need to round it off and multiply with the difference of those numbers.

SUGGESTIONS

RANDBETWEEN FUNCTION