SUMIFS Function in Excel — With Examples (Multiple Criteria, Dates, Wildcards)
Learn the SUMIFS function in Excel: sum with multiple criteria, date ranges, wildcards, and the SUMIF argument order trap.
Read Guide →You want to flag the orders of at least 1200 — not over 1200, at least 1200. The difference is one row, and the operator that decides it is >=, not >. The six comparison operators in Excel are =, <>, >, <, >= and <= — each one compares two values and returns TRUE or FALSE — and this guide runs all six on the same ten-order table, so you can check every answer yourself: the boundary row where > and >= differ, between two numbers, not equal, after a date, and the cap that stops a value exceeding a maximum — plus the COUNTIF quotes rule that catches everyone.
Quick takeaway: in >= and <= the equals sign always goes second.
= equal, <> not equal, > greater than, < less than, >= at least, <= at most.<>, never !=. Excel rejects => and =<.=C2>=1200 is TRUE when C2 is 1200. =C2>1200 is FALSE when C2 is 1200. That one row is the whole difference.=COUNTIF(C2:C11,">=1200"). To compare against a cell, join with &: ">="&G2.
Every example below uses the same ten orders. Every result was checked against them.
| Excel row | A Rep | B Region | C Sales | D Order Date | E Status | F Notes |
|---|---|---|---|---|---|---|
| 2 | Alex | East | 1200 | 9/3/2026 | Paid | Rush |
| 3 | Priya | West | 850 | 9/15/2026 | Pending | (blank) |
| 4 | Jordan | east | 2400 | 10/2/2026 | Paid | Gift wrap |
| 5 | Sam | North | 450 | 10/9/2026 | Paid | Call first |
| 6 | Alex | West | 1750 | 10/20/2026 | Pending | (blank) |
| 7 | Taylor | East | 600 | 10/22/2026 | Paid | Rush |
| 8 | Priya | East | 900 | 11/4/2026 | Pending | (blank) |
| 9 | Jordan | South | 1100 | 11/12/2026 | Paid | Delivery |
| 10 | Sam | West | 300 | 11/20/2026 | Pending | (blank) |
| 11 | Alex | North | 1500 | 12/1/2026 | Paid | Rush |
A comparison has the shape =value1 operator value2. Excel works out the two values, compares them and shows TRUE or FALSE. Row 2 is the key row: the sales are exactly 1200, which is where the choice between > and >= matters.
| Operator | Meaning | Example on row 2 (C2 = 1200) | Result |
|---|---|---|---|
= | Equal to | =C2=1200 | TRUE |
<> | Not equal to | =C2<>1200 | FALSE |
> | Greater than | =C2>1200 | FALSE |
< | Less than | =C2<1200 | FALSE |
>= | Greater than or equal to (“at least”) | =C2>=1200 | TRUE |
<= | Less than or equal to (“at most”) | =C2<=1200 | TRUE |
The first = starts the formula. The second one is the comparison. In the two-character signs, the < or > always comes first: >= and <=. Excel rejects => and =<. And not equal is <> — a less-than sign followed by a greater-than sign — never != (used in many programming languages) or the ≠ symbol. Only <> works.
Run the two operators down the whole Sales column and count:
| Test | Formula | Count | Rows |
|---|---|---|---|
| Sales over 1200 | =COUNTIF(C2:C11,">1200") | 3 | 4, 6, 11 |
| Sales at least 1200 | =COUNTIF(C2:C11,">=1200") | 4 | 2, 4, 6, 11 |
| Sales at most 1200 | =COUNTIF(C2:C11,"<=1200") | 7 | 2, 3, 5, 7, 8, 9, 10 |
| Sales under 1200 | =COUNTIF(C2:C11,"<1200") | 6 | 3, 5, 7, 8, 9, 10 |
The difference between >1200 and >=1200 is exactly one row — row 2, the order of exactly 1200. The same row is the difference between <=1200 (7 rows, including row 2) and <1200 (6 rows, excluding it). Whenever a threshold can be hit exactly, > and >= are different formulas, and the row on the threshold is the one that decides which you meant. The sums show it too: =SUMIF(C2:C11,">1200",C2:C11) gives 5650, and =SUMIF(C2:C11,">=1200",C2:C11) gives 6850 — the difference is row 2’s 1200.
There is no “between” operator. You join two comparisons with AND:
=AND(C2>=1000, C2<=2000)
That is TRUE on rows 2, 6, 9 and 11 — 1200, 1750, 1100 and 1500 — and FALSE on the other six. Count them without a helper column:
=COUNTIFS(C2:C11,">=1000",C2:C11,"<=2000")
That returns 4. The same idea works with dates: =AND(D2>=DATE(2026,10,1), D2<=DATE(2026,11,30)) is TRUE on the October and November orders. And with IF for a label: =IF(AND(C2>=1000,C2<=2000),"In range","Out of range").
<> returns TRUE when two values are different. It works with numbers, text and cell references:
| Test | Formula | Count | Rows |
|---|---|---|---|
| Status is not Pending | =COUNTIF(E2:E11,"<>Pending") | 6 | 2, 4, 5, 7, 9, 11 |
| Sales not equal to zero | =COUNTIF(C2:C11,"<>0") | 10 | all ten |
| Sales greater than zero | =COUNTIF(C2:C11,">0") | 10 | all ten |
| Sales less than zero | =COUNTIF(C2:C11,"<0") | 0 | none |
| Notes are not blank | =COUNTIF(F2:F11,"<>") | 6 | 2, 4, 5, 7, 9, 11 |
| Notes are blank | =COUNTIF(F2:F11,"=") | 4 | 3, 6, 8, 10 |
To check that a cell isn’t empty, compare it with empty text: =F2<>"" is TRUE on the six notes that have text and FALSE on the four blanks. And =F2="" is TRUE on the blanks. Note the last two rows of the table: COUNTIF uses "<>" for non-blank and "=" for blank — the equals sign on its own means “empty”, which is the one place a bare = does not mean “equal to a value”.
Dates are numbers in Excel, so the same operators work on them:
| Test | Formula | Count |
|---|---|---|
| Orders after 1 Oct 2026 | =COUNTIF(D2:D11,">10/1/2026") | 8 |
| Orders on or after 1 Oct 2026 | =COUNTIF(D2:D11,">=10/1/2026") | 8 |
| Orders before 1 Oct 2026 | =COUNTIF(D2:D11,"<10/1/2026") | 2 |
There is no order on 1 Oct itself, so > and >= give the same count here — 8. The two orders before October are rows 2 and 3, 3 Sep and 15 Sep. Write the date in the format your Excel expects, or use DATE: =COUNTIF(D2:D11,">"&DATE(2026,10,1)) — the & joins the operator to the date, and the date is never typed as text.
The “max value not to exceed” keyword is a cap, and MIN is the formula for it:
=MIN(C2,2000)
That returns 2000 for row 4’s 2400 and 1200 for row 2’s 1200 — the value, or the cap, whichever is smaller. The IF version says the same thing: =IF(C2>2000,2000,C2). Use the cap when a discount, a bonus or a fee must never pass a limit: =MIN(C2*10%,500) pays 10% of sales but never more than 500.
While TRUE and FALSE are useful, you often want a more descriptive outcome, and the IF function is your best friend for this — it performs a logical test and returns one value if the result is true and another if it’s false:
=IF(C2>=1200, "Big", "Small")
That returns “Big” on rows 2, 4, 6 and 11, and “Small” on the other six. For more than two outcomes, put one IF inside another, or use IFS for cleaner, easier-to-read logic with multiple conditions:
=IFS(C2>=2000,"Huge",C2>=1200,"Big",C2>=600,"Medium",TRUE,"Small")
That returns “Huge” on row 4, “Big” on rows 2, 6 and 11, “Medium” on rows 3, 7, 8 and 9, and “Small” on rows 5 and 10. The last test, TRUE, is the catch-all — IFS needs it, because it errors when no test is true. AND is TRUE only when all its conditions are true, OR is TRUE when at least one is true, and NOT flips TRUE to FALSE and FALSE to TRUE: =IF(AND(C2>=1000,E2="Paid"),"Big paid order","No") is TRUE on rows 2, 4, 9 and 11.
Inside COUNTIF, SUMIF and their -IFS versions, the operator goes inside quotes as part of the criteria:
| What you want | Formula | Result |
|---|---|---|
| Orders over 1000 | =COUNTIF(C2:C11,">1000") | 5 |
| Sales over 1000 | =SUMIF(C2:C11,">1000",C2:C11) | 7950 |
| Orders at least 1200 | =COUNTIF(C2:C11,">=1200") | 4 |
| Orders not Pending | =COUNTIF(E2:E11,"<>Pending") | 6 |
To compare against a cell, keep the cell outside the quotes and join it with &. Inside quotes, ">=1200" is text; outside, the cell is a value:
=COUNTIF(C2:C11,">="&G2)
With 1200 in G2, that returns 4 — the same as ">=1200". Change G2 to 1000 and it returns 5, without touching the formula. That is the rule: the operator in quotes, the cell outside, joined with &.
Text goes in double quotes, and three rules apply. First, text comparisons ignore capital letters: =B2="east" is TRUE on rows 2, 4, 7 and 8 — including row 4, where the region is written “east” in lowercase. =B2<>"East" is FALSE on those four rows and TRUE on the other six. Second, a number never equals the same digits stored as text: ="1200"=1200 is FALSE, and =C2="1200" is FALSE on every row — if a comparison that should be TRUE keeps coming back FALSE, check whether one side is text. Third, without quotes, =B2=Leeds gives #NAME?, because Excel looks for something called Leeds.
And one more rule about order: Excel does comparisons last, after any maths in the formula, so =2+3>4 adds first and then compares — 5 is greater than 4, so the result is TRUE. =10/2+3=8 is TRUE, and =(10+2)/3=4 is TRUE. Use brackets when you are not sure.
The two “conditional formatting” keywords in this group are the same operators, written as a formula rule. Select the data rows, Home → Conditional Formatting → New Rule → “Use a formula…”, and write the formula for the top-left cell of the selection:
| Rule | Formula | Rows highlighted |
|---|---|---|
| Sales at least 1200 | =$C2>=1200 | 2, 4, 6, 11 |
| Sales over 2000 | =$C2>2000 | 4 |
| Sales between 1000 and 2000 | =AND($C2>=1000,$C2<=2000) | 2, 6, 9, 11 |
| Status is not Pending | =$E2<>"Pending" | 2, 4, 5, 7, 9, 11 |
The $ locks the column so every cell in a row reads the same trigger cell, and the row number moves down — the same pattern as the highlight row guide. The full conditional-formatting walkthrough is on that page.
How do I write greater than or equal to in Excel? >= — the greater-than sign first, then the equals sign. =C2>=1200 is TRUE when C2 is 1200 or more.
Is it => or >=? >=. Excel rejects => and =<. In both two-character signs the < or > always comes first.
How do I write not equal in Excel? <> — a less-than sign followed by a greater-than sign. Excel doesn’t accept != or the ≠ symbol. Only <> works.
How do I check if a value is between two numbers? =AND(C2>=1000,C2<=2000) — TRUE on rows 2, 6, 9 and 11 in this guide. Or count them with =COUNTIFS(C2:C11,">=1000",C2:C11,"<=2000"), which returns 4.
Why does my COUNTIF with >= not work? The operator goes inside quotes: =COUNTIF(C2:C11,">=1200"). To compare against a cell, join with &: =COUNTIF(C2:C11,">="&G2).
How do I compare against a date? The same way — dates are numbers: =COUNTIF(D2:D11,">10/1/2026") returns 8 on this table. Use DATE to be safe: ">"&DATE(2026,10,1).
How do I cap a value so it never exceeds a maximum? =MIN(C2,2000) — the value, or the cap, whichever is smaller. Row 4’s 2400 becomes 2000.
That is the six comparison operators in Excel: =, <>, >, <, >= and <= — each one compares two values and returns TRUE or FALSE — and on the ten-order table in this guide they answer every question: at least 1200 is four orders, over 1200 is three, between 1000 and 2000 is four, not Pending is six, after 1 October is eight, and the cap turns 2400 into 2000. Remember the two things that catch everyone once: in >= and <= the equals sign always goes second, and not equal is <>, never != — and remember the boundary row, because whenever a threshold can be hit exactly, > and >= are different formulas and the row on the threshold is the one that decides which you meant. And remember the quotes rule: inside COUNTIF and SUMIF the operator goes inside quotes, and to compare against a cell you join it with &. From here, the next functions worth learning are the ones these operators sit inside — the IF formula itself, for the nesting and the IFS version, and the COUNTIF formula for the counting and summing — and the full learning order for the whole site is on the Excel Formulas hub and the Logical & Conditional category page.
Learn the SUMIFS function in Excel: sum with multiple criteria, date ranges, wildcards, and the SUMIF argument order trap.
Read Guide →Learn how to shade every other row in Excel: the MOD formula, banded table rows, odd rows, every third row and filters.
Read Guide →Learn the Excel formula for if a cell contains specific text: ISNUMBER with SEARCH, FIND for case, and COUNTIF wildcards.
Read Guide →