FormulaCraft

Fix the SUMIF error

Excel & Google Sheets
Topic:SUMIF & SUMIFS

What SUMIF means

SUMIF 'not working' covers several symptoms: returning 0 when a non-zero sum is expected, returning #VALUE!, returning the wrong number, or the formula showing as text. The root cause is almost always a criteria problem, a range mismatch, or a data-type inconsistency in the sum_range.

Common causes

Example fix

Broken
=SUMIF(B2:B100,>100,C2:C100)
Fixed
=SUMIF(B2:B100,">100",C2:C100)

The comparison operator > must be inside a quoted string. Without quotes it is a syntax error in most spreadsheet engines.

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How to fix it

  1. 1Always quote comparison operators: =SUMIF(B:B,">100",C:C). To use a cell reference for the threshold: =SUMIF(B:B,">"&E2,C:C).
  2. 2Add the sum_range explicitly: =SUMIF(A:A,"Criteria",B:B). Only omit it if you intentionally want to sum the criteria_range values.
  3. 3If the cell shows formula text: select the cell, press Ctrl+1 (Excel) or Format > Number (Sheets), change from Text to General, then press F2 and Enter to re-evaluate.
  4. 4For cross-sheet references in Google Sheets, reference the full range: =SUMIF(Sheet2!A:A,"value",Sheet2!B:B) rather than relying on implicit sheet context.
  5. 5Test by temporarily replacing the criteria with a hard-coded known value to confirm the formula structure is correct before introducing cell references or operators.

Stop hunting errors by hand.

Upload your spreadsheet and the Auditor flags every SUMIF and broken formula at once — or paste this one formula and get the fix explained.

Frequently asked

How do I use SUMIF with a dynamic criteria value from another cell?

Concatenate the operator and the cell: =SUMIF(B:B,">"&E2,C:C). This joins the operator string with the number in E2 at calculation time.

Does SUMIF work with dates as criteria?

Yes, but the date must be a real date value, not text. Use =SUMIF(A:A,">"&DATE(2024,1,1),B:B) to sum rows after 1 Jan 2024.

Can SUMIF sum multiple criteria — for example, two categories?

SUMIF only handles one criteria range and one criteria value. For multiple criteria, use SUMIFS, which accepts pairs of criteria_range and criteria.

More on SUMIF & SUMIFS

See all →

Related formulas

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: