Microsoft Office Tutorials and References

In Depth Information

The SUMIF function is very useful for single-criterion sum formulas. The SUMIF function takes three argu-

ments:

•
range:
The range containing the values that determine whether to include a particular cell in the sum.

•
criteria:
An expression that determines whether to include a particular cell in the sum.

•
sum_range:
(Optional) The range that contains the cells that you want to sum. If you omit this argument,

the function uses the range specified in the first argument.

The examples that follow demonstrate the use of the SUMIF function. These formulas are based on the work-

sheet shown in Figure 7-16, set up to track invoices. Column F contains a formula that subtracts the date in

column E from the date in column D. A negative number in column F indicates a past-due payment. The work-

sheet uses named ranges that correspond to the labels in row 1. Various summing formulas begin in row 15.

Figure 7-16:
A negative value in column F indicates a past-due payment.

All the examples in this section also appear at this book's website in the file named

conditional summing.xlsx.

Summing only negative values

The following formula returns the sum of the negative values in column F. In other words, it returns the total

number of past-due days for all invoices. For this worksheet, the formula returns –63.