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

  1. Download your statement as CSV or Excel from online banking and open it in Excel.
  2. 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.
  3. Select the data and press Ctrl+T (Cmd+T on Mac) to make it a table. Formulas then fill down by themselves.
  4. 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

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 rulesStatement Analyzer
CostFree if you have Excel$6.52 once
SetupAn hour or twoDrop in files
PDF statementsNeed converting firstRead directly (text PDFs)
Subscriptions and feesBy handFound automatically
FlexibilityAnything you can buildFixed 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