Excel SUMIFS and AVERAGEIFS Practical Patterns: Multi-Criteria Aggregation Made Easy

Excel SUMIFS and AVERAGEIFS Practical Patterns: Multi-Criteria Aggregation Made Easy

Use Excel SUMIFS and AVERAGEIFS to calculate totals and averages accurately and quickly when you have multiple criteria such as date, region, and category. This guide covers standard templates and common pitfalls, including numbers stored as text, spaces, and date-range handling.

Quick Fix (3 Minutes)

  1. Convert the source data to an Excel Table (Ctrl+T) (SalesT).
  2. Basic total: =SUMIFS(SalesT[Amount], SalesT[Region], "East")
  3. Date range: =SUMIFS(SalesT[Amount], SalesT[Date], ">="&G2, SalesT[Date], "<="&H2)
  4. Partial match: =SUMIFS(SalesT[Amount], SalesT[Category], "*JEANS*")
  5. Average: =AVERAGEIFS(SalesT[Amount], SalesT[Region], "East", SalesT[Category], "TOP")

Key Concepts

  • Combine comparison operators as text: ">="&cell.
  • Wildcards: * for zero or more characters, ? for one character, and ~ as an escape character.
  • Each criterion is combined with AND logic; use multiple formulas added together for OR logic.

Practical Example

DateRegionCategoryAmount
2025-01-05EastTOP120000
2025-01-20WestBTM90000
2025-02-03EastTOP80000
2025-02-14SouthACC45000
2025-02-25EastJEANS130000
2025-03-09NorthBTM150000
2025-03-20EastJEANS-SLIM110000

Date Range Total

=SUMIFS(SalesT[Amount], SalesT[Date], ">="&$G$2, SalesT[Date], "<="&$H$2)

Monthly Total

=SUMIFS(SalesT[Amount],
 SalesT[Date], ">="&EOMONTH($A$2,-1)+1,
 SalesT[Date], "<="&EOMONTH($A$2,0))

Partial Match

=SUMIFS(SalesT[Amount], SalesT[Category], "*JEANS*")

OR Criteria

=SUMIFS(SalesT[Amount], SalesT[Region], "East")
+SUMIFS(SalesT[Amount], SalesT[Region], "West")

Average and Share

=AVERAGEIFS(SalesT[Amount], SalesT[Region], "East", SalesT[Category], "*JEANS*")
=SUMIFS(SalesT[Amount], SalesT[Region], "East")/SUM(SalesT[Amount])

Alternatives and Enhancements

  • Excel Tables and structured references make formulas easier to maintain.
  • Defined names improve the readability of date-range and criteria cells.
  • Use FILTER for preprocessing, then combine it with SUM.
  • PivotTables are useful for complex axes and filters.

Troubleshooting

SymptomCauseSolution
Result is 0Dates or numbers stored as textUse VALUE, Text to Columns, or consistent formatting
Only some records are includedMismatched rangesUse table references
Wildcard does not workMissing symbolCheck the rules for * / ? / ~
Date-range errorOperator concatenation is missingUse the ">="&cell format
Space issueCHAR(160)Use SUBSTITUTE, then TRIM/CLEAN
Slow performanceFull-column referencesMinimize column ranges or use a PivotTable

Conclusion & Internal Links

Leave a Reply

Your email address will not be published. Required fields are marked *