between(
VALUE
,
MINIMUM
,
MAXIMUM
)
The between( function checks to see if a value is between two other values.
Parameters
This function has three parameters:
value – the value to check. The value may be a number, date or text.
minimum – minimum value that matches. The minimum may be a number, date or text, but it must be the same type as the value parameter.
maximum – maximum value that matches. The maximum may be a number, date or text, but it must be the same type as the value parameter.
Description
This function checks to see if a value is between two other values. The resut will be true if the value is between or equal to the minimum and maximum values. If the value is outside this range the result will be false.
between(3,2,6) ☞ -1 (true)
between(3,8,6) ☞ 0 (false)
between("e","a","g") ☞ -1 (true)
between("m","a","g") ☞ 0 (false)
between(today(),date("monday"),date("friday")) ☞ -1 (true)
The final example above checks to see if today is a weekday or not. If today is Monday thru Friday the formula returns true, for Saturday and Sunday, it returns false.
Note: This function is equivalent to:
thevalue>=themin and thevalue<=themax
See Also
- < -- compares two values to see if the first value is less than the second value.
- <= -- compares two values to see if the first value is less than or equal to the second value.
- <> -- compares two values to see if they are different.
- = -- compares two values to see if they are the same.
- > -- compares two values to see if the first value is greater than the second value.
- >= -- compares two values to see if the first value is greater than or equal to the second value.
- beginswith -- returns true if the value on the left starts with
the value on the right, false if it doesn't.
- contains -- returns true if the value on the left contains
the value on the right, false if it doesn't.
- containsword -- returns true if the text contains a specified word, false if it doesn't.
- endswith -- returns true if the value on the left ends with
the value on the right, false if it doesn't.
- like -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- limit( -- 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.
- match -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- matchexact -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- notbetween( -- checks to see if a value is *not* between two other values.
- notcontains -- returns true if the value on the left does not contain
the value on the right, false if it does.
- notmatch -- checks to see if the text on the left does not match the wildcard pattern specified on the right.
- notmatchexact -- checks to see if the text on the left doesn't match the wildcard pattern specified on the right.
- regexmatch -- checks to see if the text on the left matches the regular expression on the right (see Regular Expressions).
- regexmatchexact -- checks to see if the text on the left matches the regular expression on the right (see Regular Expressions).
- soundex( -- computes a four character code that roughly corresponds to the phonetic pronunciation of the word.
- soundslike -- compares two words to see if they "sound like" each other.
History
10.0 | No Change | Carried over from Panorama 6.0. |