The guide · Criteria in a cell
Why put the condition in a cell?
=SUMIF(C2:C11, ">=500") answers one question. Put the 500 in its own cell, point the formula at it, and the same formula answers any minimum you type in. It also shows the reader what the total is based on.
Two cases
| You want | Write |
|---|---|
| Rows that match the cell exactly | =SUMIF(B2:B11, F3, C2:C11) |
| Rows above, below, or not equal to the cell | =SUMIF(C2:C11, ">="&F2) |
To match exactly, point at the cell with no quotes. For a comparison, the condition has to be one piece of text like ">=500". & joins two pieces of text, so ">="&F2 builds ">=500" out of the operator and whatever is in F2 right now.
Why ">=F2" gives 0
Everything inside quotes is text, so ">=F2" means "at least the text F2". None of the amounts compare that way, so nothing matches and the total is 0. There's no error to warn you, which makes this mistake easy to miss.
It works the same everywhere
COUNTIF, COUNTIFS, SUMIFS, AVERAGEIF and AVERAGEIFS read their conditions the same way:
=COUNTIF(C2:C11, ">"&F2)
=SUMIFS(C2:C11, B2:B11, F3, C2:C11, ">="&F2)
=COUNTIF(B2:B11, "<>"&F3)
If you copy the formula to other cells, lock the condition cell: ">="&$F$2. See absolute references.
Common mistakes
- The cell inside the quotes.
">=F2"is text; write">="&F2. - Forgetting the &.
">="F2is not a formula Excel can read. - > instead of >=. "At least 500" includes an order of exactly 500.
- Typing the value anyway.
">=500"gives the right total until someone changes F2.
FAQ
- How do I use a cell reference in SUMIF criteria?
- For an exact match, point at the cell: =SUMIF(B2:B11,F3,C2:C11). For a comparison, join the operator and the cell: =SUMIF(C2:C11,">="&F2).
- Why does SUMIF with ">="&A1 work but ">=A1" doesn't?
- Inside quotes, A1 is just text. The & joins the operator to the value in A1, so Excel gets a condition like ">=500".
- How do I count cells greater than the value in another cell?
- Use =COUNTIF(C2:C11,">"&F2). The same pattern works in COUNTIFS, SUMIFS and AVERAGEIF.
- Can I use a date in a cell as the SUMIF condition?
- Yes: =SUMIF(A2:A11,">="&F2,C2:C11) adds the rows on or after the date in F2, as long as the column holds real dates, not text.