Math & Trig All versions ◉ 24 views Volatile

=RANDBETWEEN()

Returns a random integer number between the numbers you specify. A new random integer number is returned every time the worksheet is calculated.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=RANDBETWEEN(bottom, top)
Hover argument names in the table for details.
Output typeNumber
Popularity30 / 100
VolatileYes
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =RANDBETWEEN() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download RANDBETWEEN.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
bottom Number Required The smallest integer RANDBETWEEN will return.
top Number Required The largest integer RANDBETWEEN will return.

▣ Examples

Random number between 1 and 100 (varies) =RANDBETWEEN(1,100)
Result: varies
Random number between -1 and 1 (varies) =RANDBETWEEN(-1,1)
Result: varies

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.