Why expense totals are the first step of any T&E analysis
Travel and expense (T&E) data looks simple: a date, a name, a category and an amount. Yet in most companies the same question comes back every month. The finance lead wants to know where the travel budget went, a manager wants to know which team member spent the most, and the CFO wants to know whether hotels or flights are the bigger lever for savings. If you are an accountant, a finance analyst, an office manager or a consultant who has to answer those questions, you need one reliable skill before anything else: turning a list of expense lines into clean totals by category and by person.
That sounds basic, but it is where many reports go wrong. A filter is applied and forgotten, a total is typed instead of calculated, a category is spelt two different ways, and suddenly the summary and the raw data no longer agree. When an auditor or a manager spots the gap, every other number in the report loses credibility. This free first lesson shows a robust method with SUMIF, shares of spend, a lookup for the largest category and a reconciliation check that proves nothing was missed.
We use the same fictional case as the lab above: Brackenridge Consulting, a small consulting firm, and its approved expense lines for March 2026. The firm, its staff, rates and policies are fictional and illustrative. Real per diem, mileage and tax rules depend on your company and your country, so always check your own policy before you apply any rate.
The core idea: one list, many views
An expense list is a long table: one row per expense line. Management, however, wants a short table: one row per category or per employee. The job is to aggregate the long table into the short one without copying or retyping any numbers. In Excel the cleanest tool for that is SUMIF.
SUMIF has three arguments: the range to check, the criterion, and the range to add. =SUMIF($C$4:$C$17,A20,$D$4:$D$17) reads as: look through the categories in C4:C17, find every row equal to the label in A20, and add the matching amounts in D4:D17. Because the criterion points to a cell (A20) instead of being typed in quotes, you can copy the same formula down for every category in the summary. The dollar signs lock the two data ranges so they stay in place when you copy, while A20 changes to A21, A22 and so on.
Two more ideas complete the picture. A share of spend is a category total divided by the grand total, so it tells you which categories matter. A reconciliation compares the summary total with the sum of all raw lines. If both numbers agree, every line landed in exactly one category. If they differ, something is wrong in the data or the summary, and you know it before anyone else does.
Worked example: Brackenridge Consulting, March 2026
Here are the fourteen approved expense lines from the lab. Four consultants travelled in early March: Ava Lindqvist, Ben Okafor, Chloe Martin and Diego Ruiz. The amounts are in US dollars and sit in D4:D17 on the lab sheet.
| Row | Date | Employee | Category | Amount (USD) |
|---|---|---|---|---|
| 4 | 03 Mar | Ava Lindqvist | Airfare | 612.40 |
| 5 | 03 Mar | Ava Lindqvist | Hotel | 486.00 |
| 6 | 04 Mar | Ava Lindqvist | Meals | 92.35 |
| 7 | 05 Mar | Ben Okafor | Ground | 54.20 |
| 8 | 06 Mar | Ben Okafor | Airfare | 388.90 |
| 9 | 06 Mar | Ben Okafor | Hotel | 702.50 |
| 10 | 07 Mar | Ben Okafor | Meals | 141.80 |
| 11 | 10 Mar | Chloe Martin | Airfare | 1,245.00 |
| 12 | 10 Mar | Chloe Martin | Hotel | 915.75 |
| 13 | 11 Mar | Chloe Martin | Meals | 168.40 |
| 14 | 11 Mar | Chloe Martin | Other | 75.00 |
| 15 | 12 Mar | Diego Ruiz | Ground | 211.60 |
| 16 | 13 Mar | Diego Ruiz | Hotel | 344.00 |
| 17 | 13 Mar | Diego Ruiz | Meals | 63.95 |
| Sum of lines | 5,501.85 |
Now the category summary. Each row uses the same SUMIF, copied down, and the share divides each total by the grand total. The summary total of 5,501.85 equals the sum of the fourteen lines, so the reconciliation passes.
| Category | Formula in column B | Total (USD) | Share |
|---|---|---|---|
| Airfare | =SUMIF($C$4:$C$17,A20,$D$4:$D$17) | 2,246.30 | 40.83 % |
| Hotel | =SUMIF($C$4:$C$17,A21,$D$4:$D$17) | 2,448.25 | 44.50 % |
| Meals | =SUMIF($C$4:$C$17,A22,$D$4:$D$17) | 466.50 | 8.48 % |
| Ground | =SUMIF($C$4:$C$17,A23,$D$4:$D$17) | 265.80 | 4.83 % |
| Other | =SUMIF($C$4:$C$17,A24,$D$4:$D$17) | 75.00 | 1.36 % |
| Total | =SUM(B20:B24) | 5,501.85 | 100.00 % |
The first surprise for many readers: the largest category is Hotel, not Airfare. Chloe Martin booked the single most expensive flight (1,245.00), so it is tempting to assume flights dominate, but four hotel stays add up to 2,448.25 against three flights at 2,246.30. Hotels and flights together account for 85.3 % of the month. Meals, ground transport and other costs share the remaining 14.7 %. That is a typical pattern in which savings efforts are usually best aimed at the two big categories, which is exactly what later lessons in this course do.
Now switch the view from category to person. The same SUMIF works, only the range to check moves from column C (category) to column B (employee):
| Employee | Formula | Total (USD) | Share |
|---|---|---|---|
| Ava Lindqvist | =SUMIF($B$4:$B$17,A28,$D$4:$D$17) | 1,190.75 | 21.6 % |
| Ben Okafor | =SUMIF($B$4:$B$17,A29,$D$4:$D$17) | 1,287.40 | 23.4 % |
| Chloe Martin | =SUMIF($B$4:$B$17,A30,$D$4:$D$17) | 2,404.15 | 43.7 % |
| Diego Ruiz | =SUMIF($B$4:$B$17,A31,$D$4:$D$17) | 619.55 | 11.3 % |
Chloe Martin accounts for 43.7 % of the month on her own, mostly because of the most expensive flight of the month and a 915.75 hotel stay. That does not mean anything is wrong. A high total is a reason to look, not a finding. Perhaps Chloe travelled to a client in an expensive city, perhaps the trip was booked late. Lesson 2 of the course checks hotel rates against city caps, and lesson 4 looks at booking lead time versus airfare, which is how you turn a high total into an explanation.
Finally, the lab asks for the name of the largest category in B33. Because the totals already sit in B20:B24, a lookup does it: =INDEX(A20:A24,MATCH(MAX(B20:B24),B20:B24,0)). MAX finds the largest total, MATCH finds its position in the list, and INDEX returns the label in the same position: Hotel. In Excel 365 or Excel 2021 the shorter =XLOOKUP(MAX(B20:B24),B20:B24,A20:A24) gives the same result.
How to build the summary in Excel, step by step
- Check the raw data first. Select the category column and use Data > Sort & Filter > Filter, then open the drop-down arrow of the column header. The list shows every distinct label. Look for spelling variants such as "Hotels" or "Hotel " before you build any formula.
- Type the summary labels exactly as they appear in the data: Airfare, Hotel, Meals, Ground, Other in A20:A24. Copying them from the data is safer than typing.
- In B20 type
=SUMIF(C4:C17,A20,D4:D17). Click inside the first range in the formula bar and press F4 to make it$C$4:$C$17, then do the same for the sum range. Press Enter. - Select B20:B24 and press Ctrl+D to fill the formula down. Check one cell to make sure the criterion moved (A21, A22) while the ranges stayed locked.
- In B25 add the total with
=SUM(B20:B24)or with AutoSum (Alt+= on Windows, Cmd+Shift+T on Mac). - In C20 type
=B20/SUM($B$20:$B$24), fill down and format as percent with Ctrl+Shift+% or Home > Number > Percent Style. The total in C25 must show 100 %. - Repeat steps 3 to 6 for the employee summary in A28:B31, with
$B$4:$B$17as the range to check. - In B33 return the largest category with
=INDEX(A20:A24,MATCH(MAX(B20:B24),B20:B24,0)). - Reconcile: in an empty cell type
=B25-SUM(D4:D17). The result must be 0. If you want a visible flag, use=IF(ROUND(B25-SUM(D4:D17),2)=0,"OK","Check"). - Optional: select A19:B24 and choose Insert > Charts > Bar to show the category totals as a bar chart. Sort the summary from largest to smallest first so the chart reads from top to bottom.
Going one step further: two conditions with SUMIFS
Sooner or later someone asks a question with two conditions: how much did Chloe spend on hotels? SUMIFS handles that. Note the different order of arguments: the sum range comes first, then pairs of range and criterion. =SUMIFS($D$4:$D$17,$B$4:$B$17,"Chloe Martin",$C$4:$C$17,"Hotel") returns 915.75. With employees down the side and categories across the top, a single SUMIFS with mixed references, for example =SUMIFS($D$4:$D$17,$B$4:$B$17,$A40,$C$4:$C$17,B$39), fills a whole employee by category matrix, which is the data behind the stacked chart above.
Averages need a count. The average hotel line is =SUMIF($C$4:$C$17,"Hotel",$D$4:$D$17)/COUNTIF($C$4:$C$17,"Hotel"), which gives 612.06 for the four stays. Excel also has AVERAGEIF for the same job. Keep in mind that this is an average per expense line, not per night. A nightly rate needs the number of nights, which the policy lesson adds.

Common mistakes and how to spot them
- COUNTIF instead of SUMIF. COUNTIF counts the hotel lines (4) instead of adding their amounts. If a category total looks like a small whole number, check the function name.
- Wrong criteria column. Looking for an employee name in the category column returns 0 for everyone. A summary full of zeros almost always means the first range points to the wrong column.
- Missing dollar signs. Without $ the ranges slide down when copied, so the last categories miss the top lines and pick up empty rows. The reconciliation then fails, which is your signal to check.
- Hidden spelling variants. "Hotel" and "Hotel " (with a trailing space) are different for SUMIF. Use the filter drop-down or
=TRIM()in a helper column to clean labels. - Typed totals. A total typed by hand does not update when a late expense line is added. Every number in a summary should be a formula that points to the data.
- Shares that do not add to 100 %. If the shares add to less than 100 %, a category is missing from the summary list. Add it, or add an "Other" row that catches the rest.
- Reading a total as a verdict. The biggest spender is not automatically the problem. Compare against trip purpose, destination and policy before drawing conclusions.
Quick reference: functions and shortcuts used
| Function or shortcut | What it does here | Example |
|---|---|---|
SUMIF | Adds the amounts that match one label | =SUMIF($C$4:$C$17,A20,$D$4:$D$17) |
SUMIFS | Adds amounts that match several conditions | =SUMIFS($D$4:$D$17,$B$4:$B$17,"Chloe Martin",$C$4:$C$17,"Hotel") |
COUNTIF | Counts lines per category, useful for averages | =COUNTIF($C$4:$C$17,A21) |
SUM | Grand total and reconciliation check | =SUM(D4:D17) |
INDEX + MATCH | Returns the label of the largest total | =INDEX(A20:A24,MATCH(MAX(B20:B24),B20:B24,0)) |
XLOOKUP | Same lookup in Excel 365 / 2021 | =XLOOKUP(MAX(B20:B24),B20:B24,A20:A24) |
| F4 | Toggles $ signs on a reference | C4:C17 to $C$4:$C$17 |
| Ctrl+Shift+% | Applies percent format | select C20:C24 |
| Ctrl+D | Fills the first formula down | select B20:B24, press Ctrl+D |
| Alt+= | Inserts AutoSum (Windows) | total row |
Real-world uses
- Monthly management report. Finance sends department heads a short table of spend by category and by employee, built from the export of the expense tool, with a reconciliation line at the bottom.
- Budget tracking. Category totals feed a budget versus actual comparison. Hotel running at 44 % of spend when the budget assumed 30 % is an early warning.
- Approval workload. Totals per employee help a manager see whose reports deserve a closer look before approving them.
- Negotiating with suppliers. A clear picture of hotel and airline spend is the starting point for talks about corporate rates with a travel agency or a hotel chain.
- Client rebilling. Consulting and engineering firms often pass travel costs on to clients. A SUMIFS by project and category gives the exact amount to invoice.
What you will build in the rest of this course
Lesson 1 is free. The lessons that follow are part of the full course, a one-time purchase of $9.90, and each one takes the Brackenridge data a step further, from simple totals to the controls and savings analysis that a finance team actually runs.
Policy Compliance: Hotel Caps by City and Class of Travel. You compute the nightly rate of each stay, look up the city cap with a default for cities that are not listed, and flag hotel stays above the cap and business-class flights the policy does not allow.
Per Diems: Travel Days, City Rates and 75 % Partial Days. You count travel days, look up each city rate and pay the first and last day at 75 %, a common structure in per diem policies, then total the allowance per employee.
Booking Lead Time vs Airfare: Buckets, CORREL and a Scatter. You measure how many days ahead each ticket was booked, compare average fares by lead-time bucket and test the relation with CORREL and a scatter chart.
Duplicate & Suspicious Claims: COUNTIFS Keys and Weekend Flags. You find claims submitted twice with the same employee, date and amount, flag weekend claims and total the value that needs checking before payment.
Mileage Reimbursement: Round Trips, Commute Deduction and a Rental Break-Even. You double round trips, deduct the normal commute without going below zero and find the distance above which a rental car is cheaper.
Savings Opportunities: Advance Booking and Preferred Hotels. You size two savings levers, late flight bookings and stays outside preferred hotels, and add them up into one number management can act on.
T&E Dashboard: Monthly Totals, Budget Variance, a Stacked Chart and Red Flags. You total six months of spend, compare it with the budget, show the category mix in a stacked column chart and highlight overspent months automatically.
Summary
Every T&E analysis starts with totals you can trust. Use SUMIF with locked data ranges and a cell reference as the criterion, copy it down for each category and each employee, express the totals as shares, return the largest category with INDEX and MATCH, and always reconcile the summary with the raw lines. In the Brackenridge data that simple routine already tells a story: hotels, not flights, are the biggest cost, and one consultant accounts for almost half of the month.
Scroll up and try it in the free lab: build the category and employee totals, the shares and the largest-category lookup. The Coach checks each cell and explains what went wrong if a formula misses.
Frequently asked questions
How do I total expenses by category in Excel?
Use SUMIF with the category column as the range, the category label as the criterion and the amount column as the sum range, for example =SUMIF($C$4:$C$17,A20,$D$4:$D$17). Copy it down for each category.
What is the difference between SUMIF and SUMIFS?
SUMIF adds amounts that meet one condition. SUMIFS can test several conditions at once, such as employee and category, and its sum range comes first in the argument list.
How do I calculate each category share of total spend?
Divide the category total by the grand total, for example =B20/SUM($B$20:$B$24), and format the result as a percentage. All shares together should add up to 100 %.
Why does my SUMIF return 0?
Usually the range to check points to the wrong column, or the labels do not match exactly, for example because of a trailing space. Check the first argument and clean the labels with TRIM if needed.
How do I find the category with the highest total in Excel?
Use =INDEX(A20:A24,MATCH(MAX(B20:B24),B20:B24,0)), or in Excel 365 =XLOOKUP(MAX(B20:B24),B20:B24,A20:A24). Both return the label next to the largest total.
How do I check that an expense summary is complete?
Reconcile it: the summary total must equal the sum of all expense lines. A formula such as =B25-SUM(D4:D17) should return 0, otherwise a line is missing or mislabelled.
Keep going: Business Travel & Expense Analytics: Policy Compliance, Per Diems & Savings
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time CHF 9.90.
- Policy Compliance: Hotel Caps by City and Class of Travel
- Per Diems: Travel Days, City Rates and 75 % Partial Days
- Booking Lead Time vs Airfare: Buckets, CORREL and a Scatter
- Duplicate & Suspicious Claims: COUNTIFS Keys and Weekend Flags
- Mileage Reimbursement: Round Trips, Commute Deduction and a Rental Break-Even
- Savings Opportunities: Advance Booking and Preferred Hotels
- T&E Dashboard: Monthly Totals, Budget Variance, a Stacked Chart and Red Flags
- Foreign-Currency Receipts: Weekly FX Rates, Card Fees and the Statement Check
- Receipt & Submission Controls: Late Claims, Missing Receipts and Approval Lag
- Meals with Attendees: Per-Person Caps and the Reimbursable Amount
- Hotel Folio Audit: Room Cap, Personal Charges and the Reimbursable Total
- Corporate Card Reconciliation: Matching Transactions, Open Items and Aging
- Rebilling Travel to Clients: Billable Spend, Contract Caps and Recovery Rate
- Unused Ticket Credits & Change Fees: Expiry Dates, Status and Value at Risk
- Cost per Travel Day by Destination: City Benchmarks, Outliers and a Histogram
- Travel Emissions: Distance, Mode Factors, Class Multipliers and a Pie Chart
- 12-Month Trend: Year-over-Year Change, Moving Average and a Seasonal Forecast
- Policy Scenarios: Savings from Earlier Booking, Preferred Hotels and Video Calls
- Final Project: Department T&E Dashboard with Budget Variance, Compliance and a Combo Chart