Excel 2019 Bible

(singke) #1

295


C H A P T E R


13


Using Formulas for Conditional


Analysis


IN THIS CHAPTER


Understanding conditional analysis
Performing conditional calculations

E


xcel provides several worksheet functions for performing conditional analysis. You’ll use some
of those functions in this chapter. Conditional analysis means performing different actions
depending on whether a condition is met.

Understanding Conditional Analysis


A condition is a value or expression that returns TRUE or FALSE. Based on the value of the condi-
tion, a formula can branch into two separate calculations. That is, when the condition returns
TRUE, one value or expression is evaluated while the other is ignored. A FALSE condition reverses
the flow of the formula, and the first value or expression is ignored while the other is evaluated.

In this section, you’ll explore some of the logical functions available in Excel.

This book’s website, http://www.wiley.com/go/excel2019bible, includes a copy of the
sample workbook for this chapter. The file is named Conditional Analysis.xlsx.

Checking if a simple condition is met
Figure 13.1 shows a list of states and six monthly gas prices. For each price, say you want to deter-
mine whether that state’s price in that month is above or below the average of all the states for
the same month. For higher than average prices, you will report “High” and for lower than average
“Low.” A grid below the data will be used to report the results.
=IF(C3>AVERAGE(C$3:C$11),"High","Low")

Excel® 2019 Bible, First Edition. Michael Alexander, Dick Kusleika and John Walkenbach.
© 2019 John Wiley & Sons, Inc. Published 2019 by John Wiley & Sons, Inc.

Free download pdf