How to categorize bank transactions in Excel
Make a small table of keywords and categories (for example WALMART = Groceries), then add a formula next to each transaction that searches the description for those keywords and returns the matching category. Anything without a match shows Uncategorized, so you add a keyword and it fills in. Totals per category come from SUMIFS or a pivot table.
Buy for $6.52 Private Bank Statement Analyzer — Find Subscriptions, Fees & Savings (Offline) · $6.52
Set up the sheet
- Download your statement as CSV or Excel from online banking and open it in Excel.
- Make sure you have one column each for Date (A), Description (B) and Amount (C). If money out and money in are in two columns, add a column with =D2-E2 style maths so money out is negative.
- Select the data and press Ctrl+T (Cmd+T on Mac) to make it a table. Formulas then fill down by themselves.
- On a new sheet called Rules, make a two-column table: Keyword and Category. Add rows like AMAZON / Shopping, UBER / Transport, NETFLIX / Subscriptions. Name the table Rules (Table Design, Table Name).
The categorize formula
Add a Category column in D. In Excel 365 or Excel 2021 and newer, use the first formula. In older versions, the second does the same job. Both are not case-sensitive and match the keyword anywhere in the description.
Excel 365 / 2021+:
=XLOOKUP(TRUE, ISNUMBER(SEARCH(Rules[Keyword], B2)), Rules[Category], "Uncategorized")
Older Excel:
=IFERROR(LOOKUP(2^15, SEARCH(Rules[Keyword], B2), Rules[Category]), "Uncategorized")
Month column (E):
=TEXT(A2, "yyyy-mm")
Total for one category and month:
=-SUMIFS(C:C, D:D, "Groceries", E:E, "2026-10")
Keep it accurate
- Filter column D to Uncategorized, find the most common merchants and add a keyword for each. Ten or twenty rules usually cover most of a month.
- Order matters when two keywords could match. XLOOKUP returns the first matching row, the older LOOKUP version returns the last one, so put specific keywords (AMAZON PRIME) where they win over general ones (AMAZON).
- Add a rule for transfers to your own accounts and card payments, with a category like Transfers, and leave it out of your totals.
- If dates came in as text, use Data, Text to Columns, and choose the date order your bank uses (DMY or MDY) to turn them into real dates.
The faster way
Building and maintaining the rules table is the slow part. The Statement Analyzer already knows thousands of merchants, reads PDF statements as well as CSV and Excel, and remembers every correction you make. It then exports an Excel report with 6 sheets (Summary, Months, Categories, Subscriptions and bills, Merchants, Transactions), so you can keep working in Excel if you like.
It runs offline on your own computer and costs $6.52 once.
Excel or the app
| Excel with rules | Statement Analyzer | |
|---|---|---|
| Cost | Free if you have Excel | $6.52 once |
| Setup | An hour or two | Drop in files |
| PDF statements | Need converting first | Read directly (text PDFs) |
| Subscriptions and fees | By hand | Found automatically |
| Flexibility | Anything you can build | Fixed reports, Excel export |
The product
Questions
Does this work in Google Sheets?
The older-Excel LOOKUP formula works in Google Sheets with normal ranges instead of table names, for example Rules!A2:A50 and Rules!B2:B50.
Why does every row say Uncategorized?
Check that the formula points at the Description column and that your keywords appear in the descriptions as written. Extra spaces in the keyword cell are a common cause.
Can I split one transaction into two categories?
Copy the row, change the amounts so they add up to the original, and give each row its own category.
Related
Updated 2026-12-01