1. Computing

Boolean Value


Using Boolean Values in Calculations

Using Boolean Values in Calculations

© Ted French

In computer science, Boolean data has two values: TRUE or FALSE.

Boolean Values and Excel's Logical Functions

Boolean values are used by Excel's Logical Functions, such as the IF function, AND function, and the OR function.

For example, the first argument of the IF function is required to return a Boolean value as an answer

That is to say the argument must always be a condition that is either TRUE or FALSE.

If TRUE the function will perform one action.

If FALSE the function will perform a different action.

Boolean Values and Other Excel's Functions

Sometimes, Boolean values are represented by the numbers " 1 " and " 0 ", with TRUE equaling 1 and FALSE equaling 0.

Even though they can be read as numbers, many of Excel's functions, such as the SUM function, the MAX function and the MIN function, still ignore Boolean values.

For example, the SUM function shown in the image above returns an answer of zero since it considers cells F1 to F4 to be blank.

To use Boolean values in functions such as SUM, the Boolean values must first be converted to numbers.

Logical Values and Excel Formulas

Excel formulas do not have the same problem using Boolean values that some functions do as can be seen in the image above.

The formula in cell E2:

   = F1 + F2 + F3 + F4

adds together the Boolean values in cells F1 to F4

Since TRUE is equal to 1 and FALSE equal to 0, the answer to the formula is 2.

   = 1 + 0 + 1 + 0
Also Known As: Logical Value
Alternate Spellings: boolean

©2014 About.com. All rights reserved.