ISBETWEEN
Returns true if a provided number is between two other numbers either inclusively or exclusively; otherwise returns false.
Syntax
ISBETWEEN(value, lower_value, upper_value, [inclusive_lower_value], [inclusive_upper_value])
Arguments
| Argument |
Description |
Required |
value |
The value to check if it lies between lower_value and upper_value. |
Required |
lower_value |
The lower boundary where value or range of values should fall within. |
Required |
upper_value |
The upper boundary where value or range of values should fall within. |
Required |
inclusive_lower_value |
Defines whether the value or range of values should include lower_value in comparison or not. Defaults to TRUE. |
Optional |
inclusive_upper_value |
Defines whether the value or range of values should include upper_value in comparison or not. Defaults to TRUE. |
Optional |
Examples
Check if value is between boundaries (inclusive)
=ISBETWEEN(5, 2, 10)
Result ⇒
true
Check boundary value inclusively
=ISBETWEEN(2, 2, 5)
Result ⇒
true
Check boundary value exclusively
=ISBETWEEN(2, 2, 5, false)
Result ⇒
false
Related Functions
Other Logical functions:
- AND - Returns true if all arguments evaluate to true
- CONTAINS - Returns true if a range contains a specified value
- IF - Returns the first value if logical_expression is TRUE; otherwise returns the second value.
- IFERROR - Returns a custom result when a formula generates an error, and a normal result when no error is detected.
- IFS - Returns the value corresponding to the first TRUE result when evaluating multiple tests.
- ISBLANK - Returns true if the value is blank, empty, or null; otherwise returns false.
- ISERROR - Returns TRUE if the value is any error value
- ISEVEN - Returns TRUE if the number is even, FALSE if odd
- ISNA - Returns TRUE if the value is the #N/A error value
- ISNUMBER - Returns TRUE if the value is a number
- ISODD - Returns TRUE if the number is odd, FALSE if even
- ISTEXT - Returns TRUE if the value is text
- NOT - Returns FALSE if logical expression is TRUE and TRUE if logical expression is FALSE.
- OR - Returns true if any argument evaluates to true
← Back to Formula Reference