These docs are for v1.0. Click to read the latest docs for v1.2.

BETWEEN

Checks if a value is between two other values, inclusive. Returns true if the value is between the specified values, and false if it is not between those values.

Syntax

=BETWEEN(value, low, high)

Arguments

ArgumentTypeDescription
valueAnyThe value to test
lowAnyThe value to use for the low side of the inclusive range
highAnyThe value to use for the high side of the inclusive range

Examples

=BETWEEN(200, 0, 100)false
Tests whether the value 200 is between 0 and 100, inclusive.

=BETWEEN(10, 5, 15)true
Tests whether the value 10 is between 5 and 15, inclusive.

=BETWEEN(5, 5, 15)true
Tests whether the value 5 is between 5 and 15, inclusive.

=BETWEEN(20, 5, 15)false
Tests whether the value 20 is between 5 and 15, inclusive.

=BETWEEN(@"Property 1", 5, 15)true
Tests whether the shape data property @"Property 1" (10, in this example) is between 5 and 15, inclusive.

=BETWEEN("carrot", "apple", "banana")false
Tests whether the string "carrot" is between "apple" and "banana", inclusive.

=BETWEEN(date(2023, 12, 18), date(2023, 11, 20), date(2023, 12, 1))false
Tests whether the date 2023-12-18 is between 2023-11-20 and 2023-12-1, inclusive.