Total one expense category (SUMIF)

Easy Math Accounting pack
Description
Hints 0/4
Solutions 0
–
Test case
1
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

The problem

Problem statement

Expenses are recorded line by line in A2:B6. The category to total is in E1. Put its total in the Total cell E2.

The category comes from E1 — the same formula has to answer for Meals or Office.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABDE
1CategoryAmountCategoryTravel
2Travel1200Total
3Office800
4Travel450
5Meals300
6Travel950

Notes

SUMIF(criteria_range, criteria, sum_range) is the whole job. The mistake that survives review longest is forgetting the third argument: with two arguments SUMIF totals the criteria column itself, which for a text category returns 0 and looks like "no expenses".

How to approach

Your answer goes in E2.

  1. Target cell is E2
  2. SUMIF takes the category column, the category, then the amounts
  3. All three ranges must be the same height
  4. Shape: =SUMIF(?, ?, ?)

Function guide

Related practice

FAQ

How do I total a category in Excel?

=SUMIF(category_column, category, amount_column). All three ranges must cover the same rows.

Why does SUMIF return 0 for a category I can see?

Usually the third argument is missing, so it summed the text column. Check that the sum range points at the amounts.