RANDBETWEEN
Creates a random value between min and max. It is possible to create a series of increasing or decreasing values by specifying a delta range. The delta is randomly chosen within its range and applied to last returned value.
Syntax
=RANDBETWEEN(Min, Max, [MinDelta], [MaxDelta], [InitialValue])
Arguments
Name | Description |
---|---|
Min | Minimum value to return. |
Max | Maximum value to return. |
MinDelta (optional) | Minimum value applied to last value in next step. If specified MaxDelta must also be set. Min and MaxDelta together define the possible range of change |
MaxDelta (optional) | Maximum value applied to last value in next step. If specified MinDelta must also be set. |
InitialValue (optional) | Initial value to start with. Only used if MinDelta and MaxDelta are given. Note: delta will be applied to initial value. |
Return
Random number between minimum and maximum argument.
Examples
Formula | Result | Comment |
---|---|---|
| e.g.: 5 | The return value can be any number between 1 and 10. |
| e.g.: 16 | Initial value is 15 to which a random delta of -1, 0 or 1 is added. 1 in this case resulting in 16. |
| e.g.: 16 | Initial value is 15 to which a random delta of 1, 2 or 3 is added. 1 in this case resulting in 16. |