Boolean logic can be used to simply formulas and eliminate the branching seen in nested IF formulas. In the example the formula in E5 is equivalent to:

### Boolean logic in other functions

Boolean logic often shows up inside other formulas and functions. The SUMPRODUCT function is a good example. To count cells in A1:A10 that are equal to “red” with SUMPRODUCT, you can use a formula like this: The double negative coerces the TRUE and FALSE values that result from the expression A1:A10=“red” to 1s and 0s, and SUMPRODUCT then returns the sum of these numbers, which corresponds to the count of cells that contain “red”. For another practical example of boolean logic, see INDEX and MATCH with multiple criteria. Author

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.