FormulaCraft

How to generate random numbers in Excel and Google Sheets

Topic:Data cleaning & shaping
Excel & Google Sheets
=RANDBETWEEN(1,100)

Verified example

Computed by a real spreadsheet engine on the sample data below.

Random Number

=RANDBETWEEN(1,100)100

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1For a random integer in a range, type =RANDBETWEEN(1,100) — replace 1 and 100 with your lower and upper bounds.
  2. 2For a random decimal between 0 and 1, use =RAND(). To scale it, multiply: =RAND()*100 gives a decimal between 0 and 100.
  3. 3To freeze the random values so they don't change, copy the cells and Paste Special → Values Only.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why do my random numbers change every time I edit the sheet?

RAND and RANDBETWEEN are volatile — they recalculate whenever anything changes. Paste as values to lock them permanently.

How do I generate random numbers without repeats?

Use RAND() in a helper column and RANK() to assign unique positions, then INDEX into your source list using those ranks.

More on Data cleaning & shaping

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: