How to Use RAND and RANDBETWEEN Functions in Excel (Video in Khmer)

Learn how to use RAND and RANDBETWEEN functions in Excel step-by-step with simple examples and Khmer video guides.

Advertisement
Formula
=RAND() | =RANDBETWEEN(bottom, top)

Hello everyone! Today I show you two very useful functions in Microsoft Excel: RAND() and RANDBETWEEN(). These two formulas help you generate random numbers very easily!

rand and randbetween formula in excel example by reancomputer101

If you want to create lottery numbers, random student IDs, random test data, or random prices for practice — these two formulas are perfect for you! And follow this video to learn. In this video I use the Khmer language.

📚 Related Tutorial: Learn more foundational formulas in our guide on Top 15 Basic Excel Formulas for Beginners ↗!


📊 Quick Comparison: RAND vs RANDBETWEEN

FunctionWhat It ReturnsBest Used For
RAND()Decimal number between 0 and 1 (example: 0.4523)Random percentage, probability simulation
RANDBETWEEN()Whole number between two values you chooseRandom scores, random IDs, lottery numbers

🛠️ Part 1: RAND Function — Random Decimal Between 0 and 1

The RAND function give you a random decimal number that is always between 0 and 1. Every time you press F9 or change anything in worksheet, the number change automatically!

Formula Syntax:

=RAND()
  • No parameter needed — just type =RAND() and press Enter!

Simple Example:

=RAND()
  • Result: Something like 0.4523 or 0.8871 — different every time you recalculate!

Real World Example:

If you want random probability (0% to 100%):

=RAND() * 100
  • Result: Random number like 45.23 (represents 45.23%)
Advertisement

🛠️ Part 2: RANDBETWEEN Function — Random Whole Number in a Range

The RANDBETWEEN function give you a random whole number (integer) between two numbers you choose. Much more useful when you want specific range like 1 to 100!

Formula Syntax:

=RANDBETWEEN(bottom, top)
ParameterMeaning
bottomThe smallest number you want (example: 1)
topThe biggest number you want (example: 100)

Simple Examples:

FormulaResultUse Case
=RANDBETWEEN(1, 10)7 (any number 1-10)Random dice roll
=RANDBETWEEN(1, 100)63 (any number 1-100)Random student score
=RANDBETWEEN(1000, 9999)4521 (any 4-digit number)Random ID or PIN

💡 Easy Pro Tips for RAND and RANDBETWEEN

  1. Stop Number from Changing: Both RAND and RANDBETWEEN recalculate every time worksheet changes. If you want to freeze the number, copy the cell → Paste Special → Values Only (paste as static number).
  2. Generate Random Date: Use RANDBETWEEN with DATE() to create random dates:
    =RANDBETWEEN(DATE(2026,1,1), DATE(2026,12,31))
    
    Then format cell as Date format to see the random date!
  3. Random Pick from List: If you have a list of names in A1:A10 and want to pick one randomly:
    =INDEX(A1:A10, RANDBETWEEN(1, 10))
    
Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement