Summary

To sum numbers based on cells being equal to a certain value, you can use either the SUMIF or SUMIFS functions. In the example shown, we are summing all sales in the West region. The formula in cell H6 is:

=SUMIF(region,"West",amount)

The formula in cell H7 is:

=SUMIFS(amount,region,"West")

Both formulas refer to the named ranges "region" (C5:C30) and "amount" (E5:E30).

Explanation 

Both formulas use built-in functions to calculate a subtotal, but the syntax used by SUMIF and SUMIFS is slightly different:

SUMIF(range,criteria,sum_range)
SUMIFS(sum_range,range,criteria)

In both cases, note that the region "West" must be enclosed in double quotes, since it is a text value.

Whether you use SUMIF or SUMIFS (which can handle more than one criteria) is a matter of personal preference. SUMIFS was introduced with Excel 2007, so it's been around now for a long time.

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

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.