Chapter 13: Using Formulas for Conditional Analysis
13
identical to the first SUMIF criteria, "<="&F5. The second criteria pair limits the dates to
greater than or equal to the start date.
Getting a count of values that meet a certain condition
Summing values isn’t the only aggregation you can do in Excel. Like SUMIF and SUMIFS,
Excel provides functions for conditionally counting values in a range.
In Figure 13.13, there is a partial listing of countries and their gross domestic product from
2000 to 2009. We want to know how many times the GDP was greater than or equal to 1 mil-
lion. The criteria to be applied will be in cell G3.
=COUNTIF(D3:D212,G3)
FIGURE 13.13
A partial listing of countries and their gross domestic product
The COUNTIF function works in a similar manner as the SUMIF function from Figure
13.9. The obvious difference, as the name suggests, is that it counts entries that meet