How to generate random numbers in Excel | The Jotform Blog (2024)

Generating random numbers can be time-consuming if you have to do it manually. But this task comes up more often than you might think.

For example, have you ever needed to pull random numbers out of a hat to choose a contest winner? Or choose random numbers from a given number range to divide large groups into teams?

When you find yourself in such a situation, Microsoft Excel can make your work easier. It has multiple random number generator functions that can do the work for you.

In fact, Microsoft Excel is so useful for so many tasks that it “has become entrenched in business processes worldwide,” says business writer Eric Rosenberg. It’s a tool that benefits “any function in any industry” because it has “almost no limits for applications,” he writes.

Here’s how to generate random numbers in Excel.

The RAND function

The RAND function in Excel generates random real numbers greater than or equal to zero and less than one. The returned random numbers, other than zero, are decimal numbers. The formula operates without arguments or parameters. You can copy the formula =RAND() into as many cells as you need random numbers.

You can, however, use the RAND function with arguments. If you want to set an upper bound value higher than one, multiply the RAND function by that value. The formula is =RAND()*n where n is the value of the upper bound.

Say you want a real number between zero and 40. The formula would be =RAND()*40. Note that the upper bound value is never returned in the results, so if you want the value 40 to be a possible returned value, the formula would need to be =RAND()*41.

You can also generate a random number between two numbers. The formula is =RAND()*(b−a)+a. If you want a number between 20 and 60 — where a is the lower bound value and b is the upper bound value — the formula would be =RAND()*(60−20)+20. Note that this formula will also not return a value equal to that of the upper bound value.

While this function in Excel can certainly save you some time, it does have one potential drawback. It generates a new random number every time an action is performed in a worksheet — even if it has nothing to do with the RAND formula — which could cause confusion. For example, any time you edit any cell or enter new data anywhere on the worksheet, the RAND formula will generate a new number.

You can, however, override this by entering =RAND() in the formula bar of a cell and then pressing F9 to change the formula to a random number. The formula will calculate and return the value just once.

You can also generate only whole numbers (or integers) using the RAND function. To do this, encapsulate either of the above formulas inside the INT function, which looks like this: =INT(RAND()*n). So, to return a random whole number between zero and 60, use =INT(RAND()*60). Or, to generate random whole numbers between 20 and 60, the formula would be =INT(RAND()*(60−20)+20).

With any of these formulas, you can generate random numbers in Excel. There is also a simpler formula for generating random integers — the RANDBETWEEN function.

How to generate random numbers in Excel | The Jotform Blog (2)

The RANDBETWEEN function

When you’re learning how to generate random numbers in Excel, the RANDBETWEEN function is an important one to master. While you can use the RAND function to achieve the same results, RANDBETWEEN is a simpler formula to return whole numbers and those within a specific range.

The formula for this function is =RANDBETWEEN(bottom,top) — the bottom number is the lowest in the range, and the top is the highest in the range. One unique feature of this function is that it can return both negative and positive numbers.

So, if you want to return a whole number between 20 and 60, the formula would read =RANDBETWEEN(20,60). Or, if you want to generate numbers between -20 and 20, you would plug =RANDBETWEEN(-20,20) into the formula bar.

As with the RAND function, the RANDBETWEEN function will automatically recalculate every time you make any changes anywhere in your spreadsheet. To sidestep this potential complication, enter the formula, then press F9 to change the value to an integer as opposed to the formula.

Microsoft Excel exists “to make your life easier,” says business consultant Isaac Jeffries. One of the ways it does this is by giving you opportunities to generate as many random numbers as you could possibly need. Learning how to generate random numbers in Excel is relatively simple, and the knowledge will save you a lot of time on mundane tasks.

How to generate random numbers in Excel | The Jotform Blog (2024)
Top Articles
8.5 Permutation Feature Importance | Interpretable Machine Learning
Adult Neurogenesis in Neurodegenerative Diseases
Northern Counties Soccer Association Nj
Poe T4 Aisling
Great Clips Mount Airy Nc
Fat Hog Prices Today
Windcrest Little League Baseball
Exam With A Social Studies Section Crossword
Sissy Transformation Guide | Venus Sissy Training
Melfme
Red Wing Care Guide | Fat Buddha Store
Craigslist In Fredericksburg
Sunday World Northern Ireland
Kagtwt
The Many Faces of the Craigslist Killer
Thayer Rasmussen Cause Of Death
About Us | TQL Careers
Nba Rotogrinders Starting Lineups
SXSW Film & TV Alumni Releases – July & August 2024
Ostateillustrated Com Message Boards
Sport-News heute – Schweiz & International | aktuell im Ticker
Unforeseen Drama: The Tower of Terror’s Mysterious Closure at Walt Disney World
Sulfur - Element information, properties and uses
Clare Briggs Guzman
Ups Drop Off Newton Ks
Reborn Rich Kissasian
Rochester Ny Missed Connections
UMvC3 OTT: Welcome to 2013!
Stihl Dealer Albuquerque
Hctc Speed Test
Claio Rotisserie Menu
Gunsmoke Tv Series Wiki
Vlacs Maestro Login
Gridwords Factoring 1 Answers Pdf
Word Trip Level 359
Cbs Trade Value Chart Week 10
Pokemmo Level Caps
Barrage Enhancement Lost Ark
Cross-Border Share Swaps Made Easier Through Amendments to India’s Foreign Exchange Regulations - Transatlantic Law International
Top-ranked Wisconsin beats Marquette in front of record volleyball crowd at Fiserv Forum. What we learned.
To Give A Guarantee Promise Figgerits
Watchseries To New Domain
Dr Adj Redist Cadv Prin Amex Charge
This 85-year-old mom co-signed her daughter's student loan years ago. Now she fears the lender may take her house
Directions To The Closest Auto Parts Store
Directions To Cvs Pharmacy
What to Do at The 2024 Charlotte International Arts Festival | Queen City Nerve
Grizzly Expiration Date Chart 2023
2013 Honda Odyssey Serpentine Belt Diagram
Billings City Landfill Hours
Generator für Fantasie-Ortsnamen: Finden Sie den perfekten Namen
Scholar Dollar Nmsu
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 6304

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.