RANDBETWEEN

Generates a random number between two specified values to support simulations and randomized calculations.

The RANDBETWEEN function returns a random number between two specified values. It generates a number within the defined range each time the function is evaluated and is commonly used in simulations, sampling, or testing scenarios where random data is required.

Syntax

RANDBETWEEN(value1,value2)

Arguments

value1 - The smallest integer RANDBETWEEN will return (Required).

value2 - The largest integer RANDBETWEEN will return (Required).

Example

RANDBETWEEN(55,105)

In the example below, the RandBetween measure is created using the RANDBETWEEN function, which generates a random number between 55 and 105.

Excel equivalent

RANDBETWEEN

Last updated

Was this helpful?