Sum with Conditions and Math Using SUMPRODUCT
You need conditional totals with a twist SUMIFS can't handle — sum the deals matching this region OR that one, or multiply quantity by price row by row while filtering — without adding helper columns.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
The comparison (A2:A10="Sales") produces one TRUE or FALSE per row, and multiplying by the values converts TRUE to 1 and FALSE to 0 — so non-matching rows contribute nothing. SUMPRODUCT then adds it all up: the total of column B for Sales rows only. This is the pre-SUMIFS workhorse, and it still does what SUMIFS can't: OR logic by adding conditions — ((A2:A10="Sales")+(A2:A10="East"))*B2:B10 — and calculations inside the sum, like units times price filtered by region, all in one cell. It works identically in every Excel version and in Google Sheets.
When to use it
Use it for OR-logic totals (Sales or East), sums that need per-row math (units × price by product line), computed conditions like month-of-date tests, or workbooks that must run on any Excel version.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08