Sum Values with OR Criteria
Combine separate SUMIFS subtotals for mutually exclusive status alternatives, creating transparent OR logic while preserving each component total and a clear, fully independent row-level reconciliation.
| SUMIFS OR Logic Formula Review | |||||||
| Compare separate subtotals with the explicit OR pattern used in the workbook. | |||||||
| Source data, synthetic | SUMIFS and SUM review, editable selections | ||||||
| Order | Customer | Status | Amount ($) | Status 1 | Complete | ||
| ORD-001 | Atlas | Complete | 60 | Status 2 | Pending | ||
| ORD-002 | Beacon | Pending | 20 | ||||
| ORD-003 | Cedar | Cancelled | 45 | Example | Formula syntax | Result ($) | |
| ORD-004 | Delta | Complete | 40 | Status 1 subtotal | =SUMIFS($D$12:$D$19,$C$12:$C$19,$G$11) | 150 | |
| ORD-005 | Ember | Open | 35 | Status 2 subtotal | =SUMIFS($D$12:$D$19,$C$12:$C$19,$G$12) | 50 | |
| ORD-006 | Forge | Pending | 30 | Sum subtotals | =SUM(H15:H16) | 200 | |
| ORD-007 | Grove | Complete | 50 | Explicit OR pattern | =SUM(SUMIFS($D$12:$D$19,$C$12:$C$19,"Complete"),SUMIFS($D$12:$D$19,$C$12:$C$19,"Pending")) | 200 | |
| ORD-008 | Harbor | Cancelled | 25 | ||||
| Reliability checks | |||||||
| Explicit OR result returns the expected $200 | OK | ||||||
| OR result reconciles to the two visible status subtotals | OK | ||||||
Overview
Return one total where a source field may equal either of two allowed values. The workbook calculates Complete and Pending subtotals separately, combines them, and exposes both components and a row-level audit.
When to use it
Use it when a short, fixed list of mutually exclusive statuses, labels, products, or accounts should feed one reporting line. Separate subtotals make the OR logic easy to review.
When not to use it
Use one SUMIFS with multiple pairs when every condition must be true together. Use a mapping table and helper category for a long or frequently maintained list. Use FILTER when the records themselves are required rather than one subtotal.
Problem
Two criteria pairs inside one SUMIFS create AND logic, requiring a row to be both Complete and Pending—an impossible condition. OR logic needs one subtotal per alternative, but duplicate alternatives could count the same rows twice.
Source data
The synthetic order data in Combined Example!C12:D19 is:
Status | Amounts | Included subtotal |
|---|---|---|
Complete | 60, 40, 50 | 150 |
Pending | 20, 30 | 50 |
Cancelled | 45, 25 | Excluded |
Open | 35 | Excluded |
Status is text and Amount is numeric. The alternatives must remain distinct when their populations overlap or duplicate counting would occur.
Each source row contains one mutually exclusive workflow status, so Complete and Pending cannot both apply to the same order. That property makes it safe to add the two subtotals. If source categories can overlap, the formula must first define how duplicate inclusion should be handled.
Calculations
- Calculate the subtotal for Complete with SUMIFS.
- Calculate the subtotal for Pending with a second SUMIFS.
- Add the two scalar results with SUM.
- Exclude every unlisted status.
- Reconcile the combined result to a row-level IF and OR audit.
Outputs
Complete orders total $150 and Pending orders total $50. The final Complete-or-Pending result is $200. Cancelled and Open amounts do not contribute.
Formula map
=SUM(SUMIFS($D$12:$D$19,$C$12:$C$19,"Complete"),SUMIFS($D$12:$D$19,$C$12:$C$19,"Pending"))
Each SUMIFS returns one scalar subtotal. The outer SUM creates OR behavior across the two mutually exclusive labels. If another AND condition is added, repeat the same criteria pair in both SUMIFS calls.
Model checks
The workbook confirms that the OR result equals the row-level included-amount audit and also equals the independently displayed Complete plus Pending subtotals. Both checks return OK.
Edge cases
- If one alternative has no matches, its subtotal is zero and the other still contributes.
- Text matching is not case-sensitive.
- Repeating an alternative counts the same population twice.
- Blank or unlisted statuses are excluded.
- Long criteria lists make this expression difficult to maintain.
- Non-mutually-exclusive conditions need overlap analysis before subtotals are added.
Common errors
- Putting both alternatives in one SUMIFS: AND logic returns zero. Calculate separate subtotals.
- Repeating a criterion: matching rows are doubled. Keep alternatives unique.
- Extending the formula indefinitely: maintenance becomes fragile. Move changing groups into a mapping table.
Example
Complete amounts are 60 + 40 + 50 = 150, while Pending amounts are 20 + 30 = 50. Adding the mutually exclusive subtotals gives $200. The row audit includes those same five amounts and independently returns $200.
Example workbook
The source data and audit occupy Combined Example!C12:E19; the fixed alternatives appear in I11:J11, and the result is in J14. Formula Review allows the two criteria to be changed and displays their separate subtotals.
Key takeaway
Create OR logic by summing one subtotal per distinct alternative, and retain component totals so overlapping or repeated criteria cannot pass unnoticed.