HomeGuides › How to Use RAND and RANDBETWEEN
Dynamic Arrays

How to Use RAND and RANDBETWEEN

Last updated: 2026-09-06

⚡ Quick Answer

RAND and RANDBETWEEN generate random numbers for sample test datasets and simulations.

=RANDBETWEEN(100, 500)

📊 Visual Demo

Book1 - Excel
HOME · INSERT · FORMULAS · DATA
fx =RANDBETWEEN(100, 500)
ABCDE
11RANDBETWEEN100 to 500=RANDBETWEEN(100, 500)342 (Integer)
22RAND0.0 to 1.0=RAND()0.7842 (Decimal)
33VolatilityRecalculatesF9 RefreshActive

🧠 Deep Dive

RAND and RANDBETWEEN generate random numbers for sample test datasets and simulations.

Key Insights

  • Dynamic arrays calculate once in the top-left cell and spill results automatically.
  • Spill ranges resize when source data changes.
  • Requires Microsoft 365 or Excel 2021+.

Common Mistakes

  • Typing data inside a spill range causes #SPILL! errors.
  • Referencing spilled cells with standard ranges.

Pro Tips

  • Use IFERROR for empty fallbacks.
  • Combine SORT + UNIQUE + FILTER.

FAQ

What does this formula do in plain English?

RAND and RANDBETWEEN generate random numbers for sample test datasets and simulations.

Why is my formula not working?

Typing data inside a spill range causes #SPILL! errors.

Does this work in Google Sheets?

Yes, this syntax is fully compatible with Google Sheets.

What is the most common mistake?

Referencing spilled cells with standard ranges.

Related Guides

How to Use the FILTER Function in ExcelHow to Use the SEQUENCE FunctionHow to Use TRANSPOSE in ExcelHow to Use RANDARRAYExcel Error Hub

Need Complete Playbooks?

Download our verified manuals covering ERP Cleanup and Modeling.

Explore Playbook Series (From ₹199)