Sumif

 

Sumif with Numeric Criteria | Sumif with Text Criteria | Sumif with Date Criteria | Sumifs

The powerful SUMIF function in Excel sums cells based on one criteria. This page contains many easy to follow SUMIF examples.

Sumif with Numeric Criteria

You can use the SUMIF function in Excel to sum cells based on numbers that meet specific criteria.

1. For example, the SUMIF function below (two arguments) sums values in the range A1:A5 that are less than or equal to 10.

Sumif Function in Excel with Two Arguments

2. The following SUMIF function gives the exact same result. It uses the & operator to join the 'less than or equal to' symbol and the value in cell C1.

Sumif Function and the Ampersand Operator

3. The SUMIF function below (three arguments, last argument is the range to sum) sums values in the range B1:B5 if the corresponding cells in the range A1:A5 contain the value 25.

Sumif Function in Excel with Three Arguments

4. The following SUMIF function gives the exact same result (second argument refers to cell D1).

Second Argument Refers to Cell D1

Sumif with Text Criteria

You can also use the SUMIF function in Excel to sum cells based on text strings that meet specific criteria. Always enclose text in double quotation marks. You can even use wildcards. A question mark (?) matches exactly one character. An asterisk (*) matches a series of zero or more characters.

1. For example, the SUMIF function below sums values in the range B1:B5 if the corresponding cells in the range A1:A5 contain exactly circle.

Sum If Equal to Text Value

2. The SUMIF function below sums values in the range B1:B5 if the corresponding cells in the range A1:A5 do not contain exactly triangle.

Sum If Not Equal to Text Value

3. The SUMIF function below sums values in the range B1:B5 if the corresponding cells in the range A1:A5 contain exactly circle + 1 character. A question mark (?) matches exactly one character.

Sumif Function with Question Mark

4. The SUMIF function below sums values in the range B1:B5 if the corresponding cells in the range A1:A5 contain a series of zero or more characters + le. An asterisk (*) matches a series of zero or more characters.

Sumif Function with Asterisk

5. The SUMIF functions below sum values in the range B1:B5 if the corresponding cells in the range A1:A5 contain exactly triangle or circle8.

Two Sumif Functions in Excel

Sumif with Date Criteria

You can also use the SUMIF function in Excel to sum cells based on dates that meet specific criteria.

1. For example, the SUMIF function below sums the sales after January 20th, 2018.

Sum If Date is Greater Than

Note: the DATE function in Excel accepts three arguments: year, month and day.

2. The SUMIF function below sums today's sales.

Sumif Function and the Today Function

Note: today is August 3rd, 2018.

Sumifs

The SUMIFS function (with the letter S at the end) in Excel sums values based on two or more criteria (first argument is the range to sum, followed by two or more range/criteria pairs).

1. For example, the SUMIFS function below sums the sales between two dates.

Sum If Date is Between

Note: the start and end date are included. Adjust the dates to sum the sales in a specific month, year, etc.