Skip to main content

Excel RANDBETWEEN Function

doc workday.intl function 1

If you want to follow along with this tutorial, please download the example spreadsheet.

doc workday.intl function 1

Description

The Excel RANDBETWEEN function returns a random integer number between two given numbers. The result includes the two given numbers. Every time RANDBETWEEN function returns a new random number when the worksheet is changed or opened.

Syntax and arguments

Formula syntax

RANDBETWEEN(bottom, top)

Arguments

  • Bottom: Required, the smallest integer number in the range of two values.
  • Top: Requied, the largest integer number in the range of two values.

Return Value

The RANDBETWEEN function returns to an integer number.

Errors

#NUM! error value occurs when argument bottom > top.

#VALUE! error value occurs when any arguments in the function are non-numeric.

Remarks

1. The RANDBETWEEN function calculates a new result when the worksheet is changed, if you want to stop the result changing, copy and paste the result as a value only to convert it to a static result.

2. If you want to use the random number which is returned by RANDBTWEEN function into other formulas, to stop the result changed by pressing Enter key, you can use F9 key first and then press Enter key to get the result, it will change the formula result to a static value.

3. RANDBETWEEN function returns an integer >= bottom, and <=top.

Version

Excel 2003

Usage and Examples

Example1: basic usage

To get a random integer number between two values, supposing between 1 and 100, please select a cell and type the formula:

=RANDBETWEEN(1,100)

Press Enter key to get the random number.

doc workday.intl function 1

Example 2: get random integer numbers in a selected ranges

If you want to get random numbers in a selected range at once time, please select a range, and type the RANDBETWEEN function in Formula Bar, then hold Ctrl and press Enter key.

doc workday.intl function 1

doc workday.intl function 1


Relative Functions:

  • Excel FACTDOUBLE Function
    The FACTDOUBLE function returns the double factorial of a given number. For example, FACTDOUBLE(5)=15, equivalent 5 x 3 x 1.

  • Excel FLOOR Function
    The FLOOR function rounds a given number down to the nearest multiple of the specified significance.

  • Excel FLOOR.MATH Function
    The Excel FLOOR.MATH function rounds a given number down to the nearest integer or nearest multiple of the specified significance.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations