Name

SUMIF

Synopsis

If you only want to sum a range of cells based on specific criteria, you can use SUMIF. For example, if the number of sales is greater than you may want to total the sales amounts.

To Calculate

=SUMIF(Range, Criteria, Sum_Range)

The Range and Criteria arguments must have values.

Range

Specifies the cell or range of cells that you want to evaluate.

Criteria

Specifies the criteria that must be met by the cells specified for the Range argument. This argument is a numeric value, an expression such as >45, or even text.

Sum_Range

Indicates the cells that should be summed if the criteria specified in the Range and Criteria arguments are met. This is an optional argument; if you omit it the cells specified in the Range argument will be summed.

Example

Figure 14-24 illustrates how SUMIF is used to sum a series of values only when they meet the specified criteria. In this example, the function looks at the sales for the six-month period, and as long as sales occurred the sales amounts are totaled.

Use SUMIF to perform a calculation only when the specified criteria is met

Figure 14-24. Use SUMIF to perform a calculation only when the specified criteria is met

Get Excel 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.