Understanding the comparison operators, Using functions – Apple Numbers '08 User Manual

Page 96

Advertising
background image

96

Chapter 5

Using Formulas and Functions in Tables

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.

Using Functions

A function is a predefined, named operation (such as SUM and AVERAGE) that you can
use to perform a calculation in a table cell.

There are several families of functions, ranging from financial functions that calculate
interest rates, investment values, and more to statistical functions that calculate
averages, probabilities, standard deviations, and more. See “About Functions” on
page 193 f
or complete information about all the functions, including the arguments
you specify to provide the data for functions to use in their calculations.

Although you can type a function into the text field of the Formula Editor or Formula
Bar, you can also use the Function Browser to add a function to a formula.

Advertising