Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=SUMIF($A$2:$A$5,"Apple",$B$2:$B$5)+SUMIF($A$2:$A$5,"Banana",$B$2:$B$5)Computed by a real spreadsheet engine on the sample data below.
| Item | Sales |
| Apple | 500 |
| Banana | 300 |
| Cherry | 450 |
| Apple | 200 |
=SUMIF($A$2:$A$5,"Apple",$B$2:$B$5)+SUMIF($A$2:$A$5,"Banana",$B$2:$B$5)→1000
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.
Yes — use SUMPRODUCT and COUNTIF: =SUMPRODUCT((COUNTIF(E2:E5,A2:A100)>0)*B2:B100) sums column B where the column-A value appears anywhere in E2:E5.
Without the >0 wrapper, rows that match more than one criterion get counted twice. Use =SUMPRODUCT(((A:A="X")+(A:A="Y")>0)*B:B) to deduplicate.
Add two SUMIFS together: =SUMIFS(C:C,A:A,"Apple",B:B,">100")+SUMIFS(C:C,A:A,"Banana",B:B,">100"). Each SUMIFS handles the AND, the + handles the OR.
Yes — =COUNTIF(A:A,"X")+COUNTIF(A:A,"Y") for 2-3 criteria, or =SUMPRODUCT(((A:A="X")+(A:A="Y")>0)*1) for many.
Yes — drop the quotes: =SUMIF(A:A,5,B:B)+SUMIF(A:A,10,B:B). For ranges use comparison operators: =SUMIF(A:A,"<5",B:B)+SUMIF(A:A,">10",B:B).
Excel 365 has SUMPRODUCT with explicit arrays, but no native SUMIF-OR. The cleanest modern option is FILTER + SUM: =SUM(FILTER(B:B,(A:A="X")+(A:A="Y"))) — only available in 365/Sheets.
Add up the cells in a range that meet a single condition.
How-toUnderstand when to use SUMIF (one condition) versus SUMIFS (multiple conditions) for conditional summing in Excel and Google Sheets.
Error fixSUMIF returns 0 instead of the expected total in Excel and Google Sheets — fix number-as-text, criteria mismatch, range size errors, and data-type issues.
ReferenceSum values that meet multiple conditions at once.
How-toUse SUMIF with a date comparison criterion to sum values only for dates on or after (or before) a specific date in your data range.
Error fixSUMIF not working in Excel and Google Sheets — diagnose formula errors, criteria syntax problems, range mismatches, and wildcard issues.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: