How to categorize bank transactions in Excel
Updated November 9, 2026
Once your bank or credit card transactions are in a spreadsheet, the next step is usually sorting them into categories: groceries, rent, subscriptions, transfers, and so on. Excel can do that with a Category column and a PivotTable. This guide walks through a simple workflow that works whether the rows came from a bank CSV download or from converting a statement PDF.
What you need
- A sheet with at least Date, Description and Amount columns (a Balance column is optional).
- Money out as negative numbers and money in as positive, or separate Debit and Credit columns. Either layout works; the steps below assume a single Amount column.
- Excel for Windows or Mac. Google Sheets can follow the same idea with its Pivot table tool.
Still looking at a PDF? See how to convert a bank statement PDF to Excel or credit card statement PDF to Excel first.
Step-by-step
- Get the transactions into Excel. Download a CSV from online banking, or convert the statement PDF and open the .xlsx file. Keep every month you want to summarize on one sheet, sorted by date.
- Add a Category column. Insert a new column to the right of Description (or at the end) and name the header
Category. - Fill a few categories by hand for common merchants you recognize: for example "GROCERY STORE #0479" → Groceries, "ONLINE TRANSFER TO SAVINGS" → Transfer, "PAYROLL DIRECT DEPOSIT" → Income. Leave unclear rows blank for now.
- Speed up the rest with Find and Replace or a lookup.
- Find and Replace: filter the Description column, then fill the visible Category cells for one merchant pattern at a time.
- Lookup table: on a second sheet, list unique description fragments in column A and categories in column B. In the Category column use a formula such as
=IFERROR(VLOOKUP(LEFT(B2,12),Lookup!$A:$B,2,FALSE),"")and adjust the fragment length to match how your bank shortens merchant names. Copy the results as values when you're happy with them.
- Turn the list into an Excel Table. Select any cell in the data and choose Insert → Table (or
Ctrl+T). Tables keep new rows inside the same structure and make PivotTables easier to refresh. - Build a PivotTable. With a cell in the table selected, choose Insert → PivotTable, put it on a new sheet, then drag:
- Category to Rows
- Amount to Values (Sum)
- Optionally Date to Columns or Filters if you want month-by-month totals
- Filter to spending. If Income and Transfers are mixed in, add Amount to Filters and show only values less than zero, or exclude those categories from the row labels. Check that the grand total matches a simple
=SUMIFon the source sheet.
Start from a clean export. StatementToSheet turns a bank or credit card statement PDF into one row per transaction in your browser, with no upload. Convert a statement now →
Category ideas that stay useful
- Keep the list short. Ten to fifteen categories are easier to maintain than fifty. Merge near-duplicates (Coffee into Dining, Streaming into Subscriptions).
- Separate Transfers and Income from spending so a PivotTable of expenses isn't inflated by moving money between your own accounts.
- Use one name per merchant family. Banks often append location codes; a short LEFT fragment or a cleaned "Merchant" helper column helps the same store land in one category.
- Review Uncategorized once a month and promote the recurring ones into your lookup list.
Excel tips once categories are filled
- Total one category without a PivotTable:
=SUMIF(D:D,"Groceries",C:C)(Category in D, Amount in C). - Count how many times a merchant appears:
=COUNTIF(B:B,"*GROCERY*"). - Group by month: add a helper column
=TEXT(A2,"YYYY-MM"), then put that field in PivotTable Columns. - Refresh after new rows: if you used an Excel Table, paste or append new transactions at the bottom, fill Category, then right-click the PivotTable and choose Refresh.
Common snags
- Amounts stored as text: the PivotTable sum stays at zero. Select the Amount column and use Data → Text to Columns → Finish, or multiply by 1 in a helper column.
- Dates that won't group by month: convert them with Data → Text to Columns or
=DATEVALUE(A2)before building the PivotTable. - Duplicate categories from typos: sort the Category column A to Z and merge near-matches (Grocery vs Groceries) before pivoting.