Logical Functions

Logical functions are used to create logical tests. A test enables a formula to make a decision based on particular data. A test can determine whether a value is greater than 25, and the formula making the test can perform one function if true, and another if false.

IF

The most common and useful logical function is the IF function, which allows you to develop several kinds of tests based on the operators used in the test statement. IF is often combined with other logical functions to create more specific tests. The syntax for the IF function looks like this:

=IF(condition,value if true,value if false)

The IF function tests that a condition is true or false. If the condition proves true, one value is returned. If the condition ...

Get Sams Teach Yourself Microsoft® Office Excel 2003 in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.