A Boolean value, sometimes referred to as a logical value, is one of several types of data used in spreadsheets like those created in Excel and Google Sheets.

Named after the 19th-century mathematician George Boole, Boolean values are part of a branch of algebra known as Boolean algebra* *or Boolean logic.

Boolean logic is important to all computer technology, not just spreadsheet programs, and rests on the concept that all values can be reduced to either TRUE or FALSE or since computer technology is based on the binary number system, to either 1 or 0.

### Boolean Values and Spreadsheet Logical Functions

The use of Boolean values in spreadsheet programs is most often associated with the logical group of functions such as the IF function, the AND function, and the OR function.

In these functions, as shown in the formulas in rows 2, 3 and 4 of the accompanying image, Boolean values can be used as the input source for one of the function's arguments, or they can form the output or results of a function that is evaluating other data in the worksheet.

For example, the first argument of the IF function in row 5 — the logical test argument — is required to return a Boolean value as an answer. The argument must always evaluate a condition that can only ever result in a TRUE or FALSE answer. As a result:

- If the argument returns an answer of TRUE, the function performs one action. In this example, it multiplies the data in cell A2 by 25.
- If the argument returns an answer of FALSE, the function performs a different action. In this case, it multiplies the data in cell A2 by 10.

### Boolean Values and Arithmetic Functions

Unlike the logical functions, most functions in Excel and Google Sheets that perform arithmetic operations such as SUM, COUNT, and AVERAGE ignore Boolean values when they are located in cells included in a function's arguments.

For example, in the example image, the COUNT function in row 5, which only counts cells containing numbers, ignores the TRUE and FALSE Boolean values located in cells A3, A4, and A5 and returns an answer of 0.

### Converting TRUE and FALSE to 1 and 0

To have Boolean values included in the calculations of arithmetic functions, they must first be converted to numeric values before passing them to the function. Two ways of accomplishing this step are to:

- Multiply Boolean values by one (as shown by the formulas in rows 7 and 8 of the example, which multiply the values TRUE and FALSE in cells A3 and A4 by one).
- Add zero to each Boolean value (as shown by the formula in row 9 of the example, which adds zero to the value TRUE in cell A5).

These operations have the effect of converting the value TRUE in cells A3 and A5 to 1 and the value FALSE in cell A4 to zero.

As a result, the COUNT function in row 10, which totals number data in cells A7 to A9, returns a result of 3 rather than zero.

### Boolean Values and Excel Formulas

Unlike arithmetic functions, formulas in Excel and Google Sheets that carry out arithmetic operations such as addition and subtraction are happy to read Boolean values as numbers without the need for conversion. Such formulas automatically set TRUE equal to 1 and FALSE equal to 0.

As a result, the addition formula in row 6 in the example image,

= A3 + A4 + A5

reads the data in the three cells as:

= 1 + 0 + 1

and returns an answer of 2 accordingly.