SUM
SUM(range)
Adds every number in the range. Text and blank cells are ignored. There is no criteria argument.
SUMIF adds a column of numbers where a related cell meets one condition. SUMIF(region, "East", amount) is the East total. SUM adds every number, with no condition. SUMIFS is the function to switch to when a row must pass two or more tests, and its arguments come in a different order.
SUM(range)
Adds every number in the range. Text and blank cells are ignored. There is no criteria argument.
SUMIF(range, criteria, [sum_range])
range is tested against criteria. sum_range is what gets added, and it must line up with range. If you omit sum_range, Excel adds the cells in range that match. A text criterion and a comparison such as ">10" go in quotes.
SUMIFS(sum_range, criteria_range1, criteria1, ...)
The range to add comes first. Each extra pair is another test, and a row has to pass all of them. That order is the reverse of SUMIF.
| Question | SUM | SUMIF | SUMIFS |
|---|---|---|---|
| Conditions | None | One | One or more, combined with AND |
| Argument order | The numbers only | Test range, then criterion, then the numbers | Numbers first, then pairs of range and criterion |
| OR logic | Not applicable | Add two SUMIF results, or use a wildcard when the pattern fits | Add two SUMIFS results |
| Wildcards | No | Yes. * is any text, ? is one character | Yes, in a text criterion |
| Versions | Every current Excel and Google Sheets | Every current Excel and Google Sheets | Excel 2007 and later, and Google Sheets |
Column A is the region and column C is the amount. East appears on three rows: 10, 30, and 20. The West row, 40, stays out.
| Row | A | B | C |
|---|---|---|---|
| 1 | Region | Product | Amount |
| 2 | East | Pen | 10 |
| 3 | West | Pen | 40 |
| 4 | East | Book | 30 |
| 5 | East | Pen | 20 |
=SUM(C2:C5) → 100=SUMIF(A2:A5,"East",C2:C5) → 60=SUMIFS(C2:C5,A2:A5,"East",B2:B5,"Pen") → 30SUM of the amount column is 100, every order. SUMIF keeps the rows whose region is East and adds 10+30+20. SUMIFS adds a second test, product Pen, so Book's 30 drops out and the total is 10+20. Notice the amount range moved to the front in SUMIFS.
Pen should match and Book should not. A criterion of P* means text that starts with P. The asterisk is any number of characters after that.
| Row | A | B | C |
|---|---|---|---|
| 1 | Region | Product | Amount |
| 2 | East | Pen | 10 |
| 3 | West | Pen | 40 |
| 4 | East | Book | 30 |
| 5 | East | Pen | 20 |
=SUMIF(B2:B5,"P*",C2:C5) → 70The three Pen amounts are 10, 40, and 20, which add to 70. Book does not start with P, so 30 is excluded. Put the wildcard inside the quotes. A criterion stored in a cell can be the text P* as well, and the formula becomes SUMIF(B2:B5, E1, C2:C5) if E1 holds P*.
A column of monthly figures with no category to filter is SUM. The free sales drill is that case: four numbers, one total.
One region, one product, one threshold, or one wildcard. SUMIF is the right size. You can compare with ">100" or "<>East" using the same quotes.
Region and product together are SUMIFS. Do not nest SUMIF. The multiple-criteria page covers AND, and the pattern of adding two SUMIFS calls when you mean OR.
SUMIF(C2:C5, "East", A2:A5) tests the amounts for the word East and then adds the region labels. The total is 0. The range you test is the range that contains East.
A2:A5 tested against C2:C4 leaves the last amount unpaired. Keep the test range and the sum range the same height, starting on the same row.
Greater than 10 has to be the text ">10". The quotes belong around the operator and the number together.
A second criterion is not an optional extra on SUMIF. SUMIFS exists because the argument list had to put the sum range first so more pairs could follow.
SUM and SUMIF are in every Excel version still in normal use, and in Google Sheets. Wildcards * and ? work in both.
SUMIFS is in Excel 2007 and later and in Google Sheets. A file that truly must open in Excel 2003 would use SUMPRODUCT for several conditions. That case is rare now. The SUMPRODUCT page shows the pattern.
Comma separators in the examples match a United States locale. Semicolon locales change the punctuation, not the order of the arguments.
Free drills are open with no account. Premium drills show the problem to everyone and grade the sheet for subscribers.
No. "East" matches east and EAST. An exact product code that differs only by case is still a match.
Yes. SUMIF(A2:A5, E2, C2:C5) uses whatever text or number is in E2. Comparisons in a cell still include the operator, so the cell contains >10 rather than the formula trying to add quotes of its own.
0. That is different from AVERAGEIF, which returns #DIV/0! when no cell qualifies. A zero from SUMIF can mean a real zero or a criterion that never hit. Check the spelling of the criterion before you trust it.
SUMIF for East plus SUMIF for West. SUMIF itself is an AND of one test only. SUMIFS does not turn into OR by adding another pair. Another pair makes the test stricter.