Excel RANDBETWEEN Function

This post will guide you how to use Excel RANDBETWEEN function with syntax and examples in Microsoft excel.

Description

The Excel RANDBETWEEN function returns a random integer number that is between the numbers you specify. Each time when the worksheet is calculated or opened, a new random integer number is generated. So you can use the RANDBETWEEN function to generate a random integer number between tow given values.

The RANDBETWEEN function is a build-in function in Microsoft Excel and it is categorized as a Math and Trigonometry Function.

The RANDBETWEEN function is available in Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000, Excel 2011 for Mac.

Syntax

The syntax of the RANDBETWEEN function is as below:

= RANDBETWEEN (bottom,top)

Where the RANDBETWEEN function arguments are:

  • bottom -This is a required argument. The smallest integer number that RANDBETWEEN Function will return.
  • top – This is a required argument. The largest integer number that RANDBETWEEN Function will return.

 Note:

  • If the bottom argument is greater than the given top value, the RANDBETWEEN function will return #NUM! Error.
  • If either of the given arguments are non-numeric, this function will return #VALUE! Error.

Excel RANDBETWEEN Function Examples

The below examples will show you how to use Excel RANDBETWEEN Function to generate a random integer between two supplied integer numbers.

1# get a random number between 1 and 200, enter the following formula in Cell B1.

=RANDBETWEEN(1,200)

excel randbetween examples1

2# get a random number between -10 and 10, enter the following formula in Cell B2.

=RANDBETWEEN(-10,10)

excel randbetween examples2

Related Functions


  • Excel RAND function
    The Excel RAND function returns a random real number that is greater than or equal to 0 and less than 1. The syntax of the RAND function is as below:=RAND ()…

More Excel Randbetween Function Examples


  • Generate Random Character Strings
    To generate random character strings in excel, you should be generate random numbers, letters, and special characters. We have talked that how to generate a random number string with Excel RANDBETWEEN function in excel…
  • Generate Random Passwords
    To generate a Random and secure password in Excel, you can use a combination of the CHAR function, the RANDBETWEEN function and concatenation operator to build a new Excel formula….
  • Randomly Select Cells
    If you want to randomly select cells from a range of cells, you can use a formula based on the INDEX function, the RANDBETWEEN function and the Rows function…..
Related Posts

How to Generate Random Values by a List in Different Cases in Excel
How to Generate Random Values in Excel10

Sometimes we may create some fake data for testing or some other purpose. If we want to create an amount of numbers, we may feel it is annoying by entering random numbers one by one. For this instance, we can ...

How to Pick a Random Name from a List in Excel
pick random names from list2

This post will guide you how to pick a random name from a list in Excel. How do I select random value from a list or a table with a formula in Excel 2013/2016. Pick Random Name from a List ...

How to Generate Random Numbers between Two Numbers in Excel
generate random numbers between two numbers4

This post will guide you how to generate random numbers between two numbers in Excel. How do I generate random numbers between two numbers without duplicates with VBA macro in Excel. Generate Random Numbers between Two Numbers with Formula Generate ...

Randomly Select Cells
randomly select cells3

This post will guide you how to randomly select cells from a list or table in Excel. How to get random value form a range of cells in an Excel Spreadsheet. Assuming that you have a list of data (B1:B7) ...

Generate Random Character Strings
generate random strings9

This post will guide you how to generate a random character string in excel. How do I create a random passwords, text strings with a formula in excel. How do I generate random strings of characters with VBA code in excel. ...

Excel XIRR Function
excel xirr examples1

This post will guide you how to use Excel XIRR function with syntax and examples in Microsoft excel. Description The Excel XIRR function returns the internal rate of return for a series of cash flows that is not necessarily periodic. ...

Excel VDB Function
excel vdb examples1

This post will guide you how to use Excel VDB function with syntax and examples in Microsoft excel. Description The Excel VDB function calculates the depreciation of an asset for a specified period based on the double declining balance method. ...

Excel SYD Function
excel syd examples1

This post will guide you how to use Excel SYD function with syntax and examples in Microsoft excel. Description The Excel SYD function calculates the sum-of-years’digits depreciation of an asset for a specified period. And it will return a numeric ...

Excel SLN Function
excel sln examples1

This post will guide you how to use Excel SLN function with syntax and examples in Microsoft excel. Description The Excel SLN function calculates the depreciation of an asset for one period based on the straight line depreciation. And it ...

Excel PV Function
excel pv examples1

This post will guide you how to use Excel PV function with syntax and examples in Microsoft excel. Description The Excel PV function returns the present value of a loan or investment based on constant payments and a constant interest ...

Sidebar