WallStreetMojo

WallStreetMojo

WallStreetMojo

MENUMENU
  • Blog
  • Free Video Tutorials
  • Courses
  • All in One Bundle
  • Login
Home » Excel, VBA & Power BI » Excel Tutorials » RAND Excel Function

RAND Excel Function

By Tanuj KumarTanuj Kumar | Reviewed By Dheeraj VaidyaDheeraj Vaidya, CFA, FRM

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

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 function 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.

Popular Course in this category
Sale
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings)
35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course

=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 excel 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 –

  • Random Numbers in VBA
  • Rand Formula
  • Randomize List in Excel sheet
  • RIGHT Function in Excel
  • VLOOKUP Wildcard
2 Shares
Share
Tweet
Share
All in One Excel VBA Bundle (35 Courses with Projects)
  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>
Primary Sidebar
Footer
COMPANY
About
Reviews
Contact
Privacy
Terms of Service
RESOURCES
Blog
Free Courses
Free Tutorials
Investment Banking Tutorials
Financial Modeling Tutorials
Excel Tutorials
Accounting Tutorials
Financial Statement Analysis
COURSES
All Courses
Financial Analyst All in One Course
Investment Banking Course
Financial Modeling Course
Private Equity Course
Venture Capital Course
Excel All in One Course

Copyright © 2021. CFA Institute Does Not Endorse, Promote, Or Warrant The Accuracy Or Quality Of WallStreetMojo. CFA® And Chartered Financial Analyst® Are Registered Trademarks Owned By CFA Institute.
Return to top

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Book Your One Instructor : One Learner Free Class
Let’s Get Started
Please select the batch
Saturday - Sunday 9 am IST to 5 pm IST
Saturday - Sunday 9 am IST to 5 pm IST

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Login

Forgot Password?

WallStreetMojo

Download RAND Function Excel Template

Special Offer - All in One Excel VBA Bundle (35 Courses with Projects) View More