Excel Function: SUMIF

The Excel function SUMIF allows you to perform a sum taking into account a criteria.


=SUMIF(range, criteria)

or (if the range for the sum is different from the criteria range)

=SUMIF(range, criteria, sum_range)

Usage Example

The goal here is to calculate the total of unpaid amounts.

excel function sumif unpaid

To differentiate between paid and unpaid amounts, we will check if the payment date is filled in or not.

To do this, click on cell C10 and select the SUMIF function:


sumif function png

Click OK.

In this case, Excel will sum all the amounts for which the payment date is blank.

excel function sumif total

To get the total of paid amounts, you can use the same formula replacing the "" (empty) criteria with the opposite "<>" (not empty) criteria:

sumif function2

To get:

If needed, you can download the Excel file used here: sumif.xlsx
If you need to add additional criteria, use the SUMIFS function.