RAND Excel Function

RAND Function in Excel

RAND function in excel is also known as the random function in excel, this formula generates a random value which is greater than 0 but is lesser than 1 and the distribution is even among those numbers if used on multiple cells, the important thing to remember is that when we recalculate the formula the result changes.

RAND-in-Excel

You are free to use this image on your website, templates etc, Please provide us with an attribution linkHow to Provide Attribution?Article Link to be Hyperlinked
For eg:
Source: RAND Excel Function (wallstreetmojo.com)

RAND Formula Excel and Explanation

RAND function is categorized as Math, or Trig function in excel returns a random number excel between 0 and 1. RAND in excel will generate a new random number excel each time your excel sheet refreshed.

RAND Formula excel has no parameter; just return a random number excel that is greater than or equal to 0 and less than 1.

RAND Formula

How to Use RAND in Excel?

RAND function is very simple and easy to use. Let us understand the working of Excel RAND function in some examples. It can be used as a worksheet functionWorksheet FunctionThe worksheet function in VBA is used when we need to refer to a specific worksheet. When we create a module, the code runs in the currently active sheet of the workbook, but we can use the worksheet function to run the code in a particular worksheet.read more and as a VBA function.

You can download this RAND Function Excel Template here – RAND Function Excel Template

Excel RAND function as a worksheet function.

Example #1

Let’s consider RAND () function in Excel to calculate the random numbers b/w 0 and 1. Excel RAND Function is used to return the random numbers between 0 and 1, as shown in the below table.

RAND Example 1

Example #2

As you know, the RAND formula in Excel is used to generate random numbers b/w 0 and 1 only, but you can use RAND () in Excel to return random numbers b/w 0 and 100 by using the following RAND formula excel.

Ex. =100*RAND () here RAND in Excel generates random number excel b/w 0 and 1; then, the output will multiple by 100 gets the numbers b/w 0 and 100. It will generate the random number excel, as shown below the table.

RAND Example 2

Example #3

If you want to calculate the random number excel between two numbers, you can use the following RAND formula Excel.

=a+ (b-a)*RAND (), where a and b may be any numbers.

RAND formula Excel generates the random number b/w two integers using RAND () in Excel.

Example – Random number excelRandom Number ExcelWe use random numbers in Excel when we wish to generate absolutely random random numbers to randomize our data for a sample evaluation, . In Excel, there are two built-in functions that offer us random numbers in cells: the =RAND() function provides us any value from 0 to 1, and the =RANDBETWEEN() function takes user input for a random number range.read more between 5 and 10 using RAND () formula in Excel =5 + (10 – 5) * RAND ().

RAND Example 3

Example #4

If you want to generate the random numbers b/w 5 and 10, you can use the RAND() =5 + (10 – 5) * RAND () it will give to the random number b/w 5 and 10 then apply INT () function on it to round the output integer to nearest positive integer.

RAND Example 4

Example #5

Rand Function also generates random time; you just need to apply the RAND () and then change the cell format to time only.

RAND Example 5

Excel RAND Function can be used as a VBA function.

Dim RandomNumber As Integer

RandomNumber = Int ((100 – 50 + 1) * Rnd + 50)

End Sub

In this example, the variable called RandomNumber would now contain a random number excel between 50 and 100.

Things to Remember

  • RAND () function in Excel calculates a new value each time the worksheet is calculated. To overcome this problem, you just need to convert the generated value to values.
  • To stop the auto change RAND () function in Excel value, you just need to the go-to RAND formula excel bar and then press F9 to convert the RAND formula Excel into its result.
  • If we wish to generate a set of random numbers in multiple cells, you just need to select the cells and enter RAND () and then press Ctrl + Enter.
  • If you want to calculate the random numbers between two numbers, you can use the following RAND formula Excel =a+ (b-a)*RAND ()

Recommended Articles

This has been a guide to RAND Function in Excel. Here we discuss the RAND Formula excel and how to use the RAND Excel function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>