# RANDBETWEEN

Formulas / RANDBETWEEN
Generate a random integer between two numbers.
`RANDBETWEEN(bottom, top)`
• RAND does not take any arguments

## Examples

• `=RANDBETWEEN(1,9)`

The RANDBETWEEN function is used to generate random numbers within a specified range. For example, if you wanted to generate a random number between 1 and 9, you would enter the preceding formula into a cell in Sourcetable. This would return a random number between 1 and 9 every time the cell is recalculated.

• `=RANDBETWEEN(-10,0)`

You can also use the RANDBETWEEN function to generate a random number between two negative numbers. For example, if you wanted to generate a random number between -10 and 0, you would enter the formula into a cell in Sourcetable. This would return a random number between -10 and 0 every time the cell is recalculated.

• `=RANDBETWEEN(10,100)`

The RANDBETWEEN function can also be used to generate a random number between two positive numbers. For example, if you wanted to generate a random number between 10 and 100, you would enter the preceding into a cell in Sourcetable. This would return a random number between 10 and 100 every time the cell is recalculated.

## Summary

The RANDBETWEEN function is a Sourcetable formula that returns a random integer between two specified numbers. Every time the worksheet is calculated, a new random number is generated. The bottom and top arguments are required and determine the smallest and largest integers that can be returned.

• The RANDBETWEEN function generates a random integer between two numbers and recalculates each time the worksheet is opened or changed. It is a volatile function that may cause performance issues in large or complex worksheets.
• The RANDBETWEEN function takes two arguments: bottom and top. Bottom is the lower limit for a random number, while top is the upper bound for a random number.