How to use the RANDBETWEEN Function in Excel?

  • Applies to: Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel for the web, Excel 2019, Excel 2016, Excel 2019 for Mac, Excel 2013, Excel 2010, Excel 2007, Excel 2016 for Mac, Excel for Mac 2011, Excel Starter 2010.

In this post, you will learn how use the RANDBETWEEN function in Excel. To begin with, we will cover a summary of this function. Next, we will examine the formula syntax of RANDBETWEEN. Finally, we will explore an example which you can experiment with and see how it works in practice.

Summary of the RANDBETWEEN Function

The RANDBETWEEN function in Excel generates a random integer number between the numbers you define. A new random integer number is brought back each time the worksheet is calculated.

An athletic field - symbolises the RANDBETWEEN function in Excel.
Image by Pexels from Pixabay.

Syntax of the RANDBETWEEN Function

RANDBETWEEN(bottom, top)

The RANDBETWEEN function syntax includes these particular arguments:

  • Bottom  –  Required. The tiniest integer RANDBETWEEN will capture.
  • Top  –  Required. The biggest integer RANDBETWEEN will obtain.
An infinite set of numbers to represent the RANDBETWEEN function.
Image by Gerd Altmann from Pixabay.

Example of the RANDBETWEEN Function

Copy the sample data in the below table, and paste it into cell A1 of a blank Excel worksheet. For formulas to display results, pick, press F2, and then press Enter. If you have to at any point, you can alter the column widths to view the whole dataset in all its wonder!

=RANDBETWEEN(1,100)Random number between 1 and 100 (varies)varies
=RANDBETWEEN(-1,1)Random number between -1 and 1 (varies)varies
Note: After a worksheet is recalculated by writing a formula or data in another cell, or by manually recalculating (press F9), a new random number is created for whichever formula that references the RANDBETWEEN function.

Other Maths Functions Topics

Round a number to the decimal places I want 

Find the remainder with MOD

Build random number generators with RAND

Convert a value between measurement systems with CONVERT

SUBTOTAL function

ROUND function

Round a number

Leave a Reply

%d bloggers like this: