Comparison Operator
Categories:
Operator | Description |
---|---|
== | Compares values |
<> | Not Equal To |
< | Less Than |
> | Greater Than |
<= | Less Than Equal To |
>= | Greater Than Equal To |
!~ | Does Not Contain |
NE()
NE(
value1
,value2
)
Returns "TRUE"
if two specified values are not equal
and "FALSE"
otherwise. Equivalent to the "<>"
operator.
Formula | Result |
---|---|
=NE(16, 16) | FALSE |
=NE(11, 11) | FALSE |
=NE(-4, 3) | TRUE |
=NE(,0) | FALSE |
EQ()
EQ(
value1
,value2
)
Returns "TRUE"
if two specified values are equal
and "FALSE"
otherwise. Equivalent to the "="
operator.
Formula | Result |
---|---|
=EQ(16, 16) | TRUE |
=EQ(11, 11) | TRUE |
=EQ(-4, 3) | FALSE |
=EQ(,0) | TRUE |
GT()
GT(
value1
,value2
)
Returns TRUE
if the first argument is strictly greater than the second, and FALSE
otherwise. Equivalent to the >
operator.
Formula | Result |
---|---|
=GT(8, 10) | FALSE |
=GT(6, 6) | FALSE |
=GT(-10, -12) | TRUE |
GTE()
GTE(
value1
,value2
)
Returns TRUE
if the first argument is greater than or equal to the second, and FALSE
otherwise. Equivalent to the >=
operator.
Formula | Result |
---|---|
=GTE(8, 10) | FALSE |
=GTE(6, 6) | TRUE |
=GTE(-10, -12) | TRUE |
LT()
LT(
value1
,value2
)
Returns TRUE
if the first argument is strictly less than the second, and FALSE
otherwise. Equivalent to the <
operator.
Formula | Result |
---|---|
=LT(8, 10) | TRUE |
=LT(6, 6) | FALSE |
=LT(-10, -12) | FALSE |
LTE()
LTE(
value1
,value2
)
Returns TRUE
if the first argument is less than or equal to the second, and FALSE
otherwise. Equivalent to the <=
operator.
Formula | Result |
---|---|
=LTE(8, 10) | TRUE |
=LTE(6, 6) | TRUE |
=LTE(-10, -12) | FALSE |
ISBETWEEN()
ISBETWEEN(
value_to_compare
,lower_value
,upper_value
,lower_value_is_inclusive
,upper_value_is_inclusive
)
Formula | Result |
---|---|
=ISBETWEEN(7.9, 1.2, 12.45) | TRUE |
=ISBETWEEN(1.2, 1.2, 12.45, TRUE) | TRUE |
=ISBETWEEN(1.2, 1.2, 12.45, FALSE) | FALSE |
=ISBETWEEN(12.45, 1.2, 12.45, TRUE, TRUE) | TRUE |
=ISBETWEEN(12.45, 1.2, 12.45, TRUE, FALSE) | FALSE |
=ISBETWEEN(7.9, 1.2, 12.45, FALSE, FALSE) | TRUE |
CONCAT()
CONCAT(
value1
,value2
)
value1
and value2
can be any scalar value or reference to a scalar value, including numeric and text types.
Formula | Result |
---|---|
=CONCAT(“Google”, “Docs”) | GoogleDocs |
=CONCAT(3,6) | 36 |
=CONCAT(“Spreadsheet”, 77) | Spreadsheet77 |
DIVIDE()
DIVIDE(
value1
,value2
)
Returns one number divided by another. Equivalent to the /
operator.
Formula | Result |
---|---|
=DIVIDE(10, 5) | 2 |
=DIVIDE(-2, 5) | -0.4 |
=DIVIDE(0, 1) | 0 |