Basic Functions
Intermediate

Travel Claims by Department

One total and one count, and both need to agree on exactly the same rows.

Task:

You're in Finance closing out last month's expense claims. Someone in Sales management wants to know how much the team spent on travel, and how many claims made up that figure. Using the Department and Category columns, put the total in B10 and the number of matching claims in B11.

Learning Objectives:

  • Total a range against two conditions at once with SUMIFS
  • Count the rows behind that total using the same criteria in COUNTIFS
  • See why criteria pairs are matched row by row rather than filtered independently
Hints

Solve without hints for +5 XP

Interactive Spreadsheet

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

ABCD
1EmployeeDepartmentCategoryAmount
2Alicia MunroeSalesTravel412.5
3Devon ParkSalesMeals68.2
4Priya AnandMarketingTravel205
5Tom ReyesSalesTravel189.75
6Lena FischerMarketingMeals42.1
7Sam OkoroSalesSoftware99
8Grace WhitfieldSalesTravel310.4
9Nadia VolkovMarketingTravel150
10Sales Travel total
11Sales Travel claims
What this exercise teaches (contains the answer)

SUMIFS and COUNTIFS test every criteria pair against the same row before it counts, which is why a Marketing claim tagged Travel or a Sales claim tagged Software never sneaks into either result — both conditions have to hold on one employee's row, not just somewhere in each column. Giving COUNTIFS the identical pair of ranges and criteria as SUMIFS, rather than a different-looking filter, is what keeps the total and the claim count guaranteed to describe exactly the same rows.