Home  /  Blog  /  Logical & Conditional
Logical & Conditional

SUMIF Formula in Excel — With Examples (and SUMIFS)

By admin 1 December 2026 Logical & Conditional

You have a list of ten orders worth $11,050 in total, and you need one number: how much came from the East, how much is already Paid, how much was sold for over $1,000. That is what SUMIF does — it adds up only the numbers that pass one test you give it. The formula has three parts, =SUMIF(range, criteria, [sum_range]), and the only thing that trips people up is the third one: when the test and the numbers live in different columns you need it, and when the test is on the numbers themselves you can leave it out. This guide gives you that rule first, then runs every example on one ten-row sales table — the same table as the COUNTIF article, so the two articles agree with each other — text, numbers, dates, wildcards, a cell reference, and SUMIFS for two conditions.

Quick takeaway: three parts — the test range, the test, and the numbers to add.

  • =SUMIF(range, criteria, [sum_range]) — add the numbers that pass one test.
  • Test and numbers in different columns: give all three parts. Test on the numbers themselves: leave sum_range out.
  • Text and comparisons go in quotes: "East", ">1000". Plain numbers and cell references do not: 1200, G2.
  • SUMIF ignores case: "East" matches east and EAST.
  • One condition only. Two conditions need SUMIFS.
SUMIF Formula in Excel — With Examples (and SUMIFS)

The Formula — Three Parts

=SUMIF(range, criteria, [sum_range])
PartWhat it does
rangeThe cells checked against the criterion — the column the test is applied to
criteriaThe test a cell must pass — a number, text, a comparison, a cell reference, or a wildcard pattern
[sum_range]Optional. The actual cells to add. If it is left out, the cells in range are summed instead

The rule for the third part, in one sentence: when the test and the numbers live in different columns, give all three parts; when the test is on the numbers themselves, leave sum_range out and SUMIF adds the range itself.

The Worked Table — The Same Table as the COUNTIF Article

Every formula below uses this ten-row sales list — the same table as the COUNTIF formula article, so the counts and the sums agree with each other. Total sales: $11,050.

RowA: RepB: RegionC: SalesD: Order DateE: StatusF: Notes
2AlexEast12009/3/2026PaidRush
3PriyaWest8509/15/2026Pending
4Jordaneast240010/2/2026PaidGift wrap
5SamNorth45010/9/2026PaidCall first
6AlexWest175010/20/2026Pending
7TaylorEast60010/22/2026PaidRush
8PriyaEast90011/4/2026Pending
9JordanSouth110011/12/2026PaidDelivery
10SamWest30011/20/2026Pending
11AlexNorth150012/1/2026PaidRush

Row 1 holds the headings. Note the trap built into the table on purpose: row 4 has “east” in lowercase — it counts and sums exactly like “East”.

Sum by Text — Total Sales per Region

The most common use. The test is on the Region column, the numbers are in the Sales column, so all three parts are needed.

GoalFormulaResult
Total sales from the East=SUMIF(B2:B11, "East", C2:C11)$5,100
Total sales from the West=SUMIF(B2:B11, "West", C2:C11)$2,900
Total sales from the North=SUMIF(B2:B11, "North", C2:C11)$1,950
Total sales from the South=SUMIF(B2:B11, "South", C2:C11)$1,100
Total sales by Alex=SUMIF(A2:A11, "Alex", C2:C11)$4,450
Total sales of Paid orders=SUMIF(E2:E11, "Paid", C2:C11)$7,250

Check the work: East $5,100 + West $2,900 + North $1,950 + South $1,100 = $11,050, the whole table. And Paid $7,250 + Pending $3,800 = $11,050 too. If your four region totals do not add up to the grand total, a row was missed — usually a lowercase twin or a trailing space. East is $5,100 because the lowercase “east” in row 4 ($2,400) is included: 1,200 + 2,400 + 600 + 900 = 5,100.

Sum by Number — Leave sum_range Out

When the test is on the numbers themselves, there is no third part — SUMIF adds the range it tested.

GoalFormulaResult
Sales over $1,000=SUMIF(C2:C11, ">1000")$7,950
Sales of $1,000 or more=SUMIF(C2:C11, ">=1000")$7,950
Sales under $500=SUMIF(C2:C11, "<500")$750
Sales exactly $1,200=SUMIF(C2:C11, 1200)$1,200

Two things to notice. First, ">1000" and ">=1000" give the same answer here — $7,950 — because no sale is exactly $1,000. A sale of exactly $1,000 would be added by ">=1000" and missed by ">1000". Second, the quotes are compulsory around the operator and the number together — >1000 without quotes is not a valid formula — but a plain number needs no quotes: =SUMIF(C2:C11, 1200) works.

Sum by Date — Before or After a Cutoff

Dates are criteria in quotes, just like text. Excel compares the date in the cell with the date in the quotes, and adds the matching rows’ sales.

GoalFormulaResult
Sales from orders after 1 Oct 2026=SUMIF(D2:D11, ">10/1/2026", C2:C11)$9,000
Sales from orders before 1 Oct 2026=SUMIF(D2:D11, "<10/1/2026", C2:C11)$2,050

The two answers add up to $11,050, the whole table — a good check that nothing was missed. One warning: the date in the quotes must be one Excel recognises as a date. If your dates are written day-first (3/9/2026 for 3 September), write the criteria the same way your Excel expects, or put the cutoff date in a cell and point at it instead — the cell-reference section below shows how.

Wildcards — Sum Cells That Contain a Word

When you want rows that contain a word, not just equal it, use wildcards. The asterisk (*) stands for any number of characters, including none. The question mark (?) stands for exactly one character.

GoalFormulaResult
Total sales by reps whose name starts with A=SUMIF(A2:A11, "A*", C2:C11)$4,450
Total sales of Rush orders=SUMIF(F2:F11, "*Rush*", C2:C11)$3,300

“Names starting with A” gives $4,450 — the three Alex rows. “Rush” with an asterisk on both sides adds any row containing the word Rush anywhere — $1,200 + $600 + $1,500 = $3,300. This is the answer to “sum if a cell contains specific text”: wrap the word in asterisks, and put the numbers column as the sum_range. If you need to count the matching rows instead of adding them, the count cells with text guide runs the same wildcard idea on its own ten-row table.

Use a Cell Reference as the Criteria

Hard-coding “East” in the formula is fine once. When the value changes, put it in a cell and point at it — no quotes around the cell reference.

Say cell H2 holds the word East:

=SUMIF(B2:B11, H2, C2:C11)

That gives $5,100, the same as "East". For a comparison against a cell, join the operator to the cell with &: say H3 holds 1000:

=SUMIF(C2:C11, ">"&H3)

That gives $7,950, the sales over $1,000. Change H3 to 1500 and the sum updates without touching the formula. The quotes stay only around the operator — the cell reference itself is never quoted.

Two Conditions — SUMIFS

SUMIF applies only one condition. When two things must be true at once, use SUMIFS — same idea, but every condition gets its own range and criteria, in pairs, and the sum_range comes first.

GoalFormulaResult
East sales that are Paid=SUMIFS(C2:C11, B2:B11, "East", E2:E11, "Paid")$4,200
West sales that are Pending=SUMIFS(C2:C11, B2:B11, "West", E2:E11, "Pending")$2,900
Sales over $1,000 that are Paid=SUMIFS(C2:C11, C2:C11, ">1000", E2:E11, "Paid")$6,200

East and Paid gives $4,200: of the four East rows, three are Paid (1,200 + 2,400 + 600) and one (Priya, row 8, $900) is Pending. Notice the argument order flips: SUMIFS puts the sum_range first, then the range-criteria pairs. Mixing the two orders up is the most common SUMIFS mistake. SUMIFS gets its own full guide later in this series — this section is only the introduction.

The Mismatched sum_range Trap — A Sum That Is Silently Too Low

This is the trap no competitor shows with numbers, and it is worse than an error, because Excel does not warn you. Microsoft’s rule: sum_range should be the same size and shape as range. If it is not, Excel sums a range that starts with the first cell in sum_range but has the same dimensions as range.

Watch what happens with the North region, whose two rows are row 5 ($450) and row 11 ($1,500):

FormulaWhat Excel actually addsResult
=SUMIF(B2:B11, "North", C2:C11)C2:C11, the full sales column$1,950
=SUMIF(B2:B11, "North", C2:C5)C2:C11 anyway — the range is 10 rows, so Excel takes 10 rows from C2$1,950
=SUMIF(B2:B5, "North", C2:C11)Only C2:C5 — the range is 4 rows, so Excel takes 4 rows from C2$450

The third formula is the dangerous one: it returns $450, not an error, and the $1,500 in row 11 is silently missed — because row 11 is outside the four rows Excel took. The fix is simple: always make sum_range the same size and shape as range.

SUM, SUMIF, SUMIFS — Which One?

Three functions that all add, and the difference is how many conditions they take.

FunctionAddsExample on this table
SUMEverything in the range=SUM(C2:C11) → $11,050
SUMIFValues passing one condition=SUMIF(B2:B11, "East", C2:C11) → $5,100
SUMIFSValues passing two or more conditions=SUMIFS(C2:C11, B2:B11, "East", E2:E11, "Paid") → $4,200

If your sum is too high, you probably used SUM where you meant SUMIF. If it is too low, check the mismatched sum_range trap above before anything else.

Why SUMIF Returns 0 — Four Checks

The most common failure, and it is almost never the function. Work through these in order.

CheckWhat happensFix
No match at allNothing in the range passes the test — e.g. “Central” is not in the table — so the sum is 0, correctlyThat 0 is the right answer; check the spelling of the criteria
A trailing spaceThe cell holds “East ” with a space, and SUMIF does not trim spaces — "East" does not match "East "Remove the space, or use =SUMIF(B2:B11, "East*", C2:C11)
Numbers stored as textThe sales column shows 1200 but holds text, so SUMIF adds nothingConvert the column to numbers first (Paste Special → Multiply by 1)
sum_range the wrong sizeThe range is 4 rows but the match is in row 11, so it is silently missedMake sum_range the same size and shape as range

Common Mistakes

MistakeWhat happensFix
You left sum_range out when the test is on textSUMIF adds the text column, which is 0 — text adds to nothingGive all three parts: =SUMIF(B2:B11, "East", C2:C11)
You wrote >1000 without quotesExcel will not accept the formulaPut the operator and number in quotes: ">1000"
You quoted a cell reference=SUMIF(B2:B11, "H2", C2:C11) looks for the text “H2”Drop the quotes: =SUMIF(B2:B11, H2, C2:C11)
You used SUMIF’s order in SUMIFSSUMIFS puts sum_range first — the wrong order sums the wrong columnSUMIFS: =SUMIFS(sum_range, range1, criteria1, ...)
You expected case to matter“East” and “east” added together, and your sum looks too highThat is correct behaviour — check for a lowercase twin

Frequently Asked Questions

What is the SUMIF formula in Excel? =SUMIF(range, criteria, [sum_range]). For example, =SUMIF(B2:B11, "East", C2:C11) adds the sales of the East orders. The result is a single number.

How do I sum if a cell contains specific text in Excel? Wrap the word in asterisks: =SUMIF(F2:F11, "*Rush*", C2:C11) adds the sales of every row whose Notes contain Rush — $3,300 on this table.

What is the difference between SUMIF and SUMIFS? SUMIF applies one condition. SUMIFS applies two or more, each with its own range and criteria — and SUMIFS puts the sum_range first, while SUMIF puts it last. SUMIFS gets its own full guide later in this series.

Why does my SUMIF return 0? Usually no match at all (and 0 is then correct), a trailing space in the data, numbers stored as text, or a sum_range the wrong size. The “why it returns 0” table above gives them in order.

Do I always need the sum_range? No. When the test is on the numbers themselves — =SUMIF(C2:C11, ">1000") — leave it out and SUMIF adds the range itself. When the test is on text in another column, you need all three parts.

Is SUMIF case-sensitive? No. “East”, “east” and “EAST” all count as the same value. If your sum looks too high, a lowercase twin is the usual cause.

Does SUMIF work with dates? Yes — dates go in quotes like text: =SUMIF(D2:D11, ">10/1/2026", C2:C11) adds the sales of orders after 1 October 2026 — $9,000 on this table.

That is the SUMIF formula in Excel: three parts, the test range, the test, and the numbers to add — with the third part needed only when the test and the numbers live in different columns. On the ten-row table in this guide, that one rule answers every question: $5,100 from the East (including the lowercase “east”), $7,950 in sales over $1,000, $9,000 from orders after 1 October, $3,300 from Rush orders, and $4,200 from East orders that are Paid. When one condition is not enough, SUMIFS takes the same pattern and adds a second range and criteria — but remember it puts the sum_range first. And when the answer comes back 0 or too low, do not blame the function: check for a trailing space, numbers stored as text, or a sum_range that does not match the range in size. From here, the next functions worth learning are the ones this one sits next to — the COUNTIF formula for counting instead of adding, and the full learning order for the whole site is on the Excel Formulas hub and the Logical & Conditional category page.


About admin

Author of Excel formula guides on this blog.

View all guides by admin →

Keep Learning

Related guides