limit(
VALUE
,
MINIMUM
,
MAXIMUM
)

The limit( function checks to see if a value is between a minimum and maximum value. If it is, the value is returned unchanged. If it is below the minimum, the minimum value is returned. If it is above the maximum the maximum value is returned.


Parameters

This function has three parameters:

value – the original value. This value may be a number, a date, or text.

minimum – the minimum value to be returned. The minimum may be a number, a date, or text, but the type must be the same as the value parameter.

maximum – the maximum value to be returned. The maximum may be a number, a date, or text, but the type must be the same as the value parameter.


Description

This function checks to see if a value is between a minimum and maximum value. If it is, the value is returned unchanged. If it is below the minimum, the minimum value is returned. If it is above the maximum the maximum value is returned.

limit(5 , 10 , 20) ☞ 10
limit(15 , 10 , 20) ☞ 15
limit(25 , 10 , 20) ☞ 20
limit("A" , "D" , "J") ☞ D
limit("G" , "D" , "J") ☞ G
limit("X" , "D" , "J") ☞ J

Note: This function is equivalent to:

min(max(thevalue,themin),themax)

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.