A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Use SUMIFS (or SUMIF) with a category column that maps each item to one of the 9 major categories, then sum by that category.
- Ensure the table has at least these columns, for example:
- Column A: Item
- Column B: Cost
- Column C: MajorCategory (values like Cat1, Cat2, …, Cat9)
- Create a summary area listing the 9 major categories, for example in E2:E10.
- In F2, enter a SUMIFS formula to sum costs for the category in E2:
=SUMIFS($B$2:$B$53, $C$2:$C$53, E2)-
$B$2:$B$53is the range of costs to sum. -
$C$2:$C$53is the range that contains the major category for each item. -
E2is the category name to aggregate.
-
- Copy the formula in F2 down to F10 to get totals for all 9 categories.
If there is only one condition (just the category), SUMIF can also be used:
=SUMIF($C$2:$C$53, E2, $B$2:$B$53)
For multiple conditions (for example, sum by category and by region or date range), extend SUMIFS with more criteria ranges and criteria, such as:
=SUMIFS($B$2:$B$53, $C$2:$C$53, E2, $D$2:$D$53, "South")
References: