Understanding the comparison operators – Apple Keynote '08 User Manual
Page 142
142
Chapter 7
Using Formulas and Functions in Tables
m
The operator ^ returns the result of raising one value to the power of another value.
For example, A2 ^ B2 returns 400.
m
The operator % returns the result of dividing a value by 100.
For example, A2% returns 0.2, formatted for display as 20%.
When a cell reference points to an empty cell, 0 is the value used.
When a cell reference points to a cell containing FALSE, 0 is used. If the cell contains
TRUE, 1 is used. For example, TRUE + 1 returns 2.
Using a string with an arithmetic operator returns an error. For example, 3 + "hello" is
not a correct arithmetic operation.
Understanding the Comparison Operators
Comparison operators compare two values and return TRUE or FALSE.
Here are the comparison operators (examples presume that cell A2 contains 20 and
that B2 contains 2):
m
The operator = returns TRUE if two values are equal.
For example, A2 = B2 returns FALSE.
m
The operator <> returns TRUE if two values aren't equal.
For example, A2<>B2 returns TRUE.
m
The operator > returns TRUE if the first value is greater than the second value.
For example, A2 > B2 returns TRUE.
m
The operator < returns TRUE if the first value is less than the second value.
For example, A2 < B2 returns FALSE.
m
The operator >= returns TRUE if the first value is greater than or equal to the second
value.
For example, A2 >= B2 returns TRUE.
m
The operator <= returns TRUE if the first value is less than or equal to the second value.
For example, A2 <= B2 returns FALSE.
Strings are larger than numbers. For example, "hello" > 5 returns TRUE.
TRUE and FALSE can be compared with each other, but not with numbers or strings.
TRUE > FALSE, and FALSE < TRUE, because TRUE is interpreted as 1 and FALSE is
interpreted as 0. TRUE = 1 returns FALSE, and TRUE = "SomeText" returns FALSE.