range2(X;L)
Returns the smallest number in a list of numbers that is greater than or equal to a given value.
Syntax
range2(X;L)
Input
| Argument | Type | Description |
|---|---|---|
X |
any numeric type | A scalar value or the name of a column |
L |
any numeric type | A scalar value A comma- or space-separated list of numbers |
Return Value
Returns an integer or decimal value (depending on the input arguments) corresponding to the
smallest number in L that is greater than or equal to
X.
If X is N/A, the result is N/A.
Sample Usage
value |
list |
range2(value;list) |
|---|---|---|
| -5 | 0,10,25,50,100 | 0 |
| 10 | 0,10,25,50,100 | 10 |
| 30 | 0,10,25,50,100 | 50 |
| 200 | 0,10,25,50,100 | |
| 10.5 | 0,10.25,25.25,50,100.75 | 25.25 |
| 0,10,25,50,100 |
