Guides

How to categorize bank transactions in Excel

Your bank will happily give you a spreadsheet of every transaction, but not one that tells you where the money went. Descriptions like SQ *BLUE BOTTLE 0412 or AMZN MKTP US*2K4LP0 have to be turned into categories like Dining out or Shopping before you can build a budget.

This guide covers three ways to do it, from quickest to set up to least work over time: a dropdown column you fill in by hand, a keyword lookup formula that does most of it for you, and automatic categorization. All three work in Excel and Google Sheets.

Before you start: get a clean export

  1. Download your transactions as CSV or Excel. Most banks have this under Statements, Activity or Download. Pick CSV if you're given a choice; it opens anywhere.
  2. Keep only the columns you need: Date, Description and Amount. Delete account numbers and balances; you don't need them to categorize.
  3. Turn the range into a table. In Excel, click any cell and press Ctrl+T (⌘+T on Mac) and name it Transactions under Table Design. Tables keep formulas and dropdowns working as you add rows.
  4. Decide your categories first. Ten to fifteen is plenty for most budgets: Groceries, Dining out, Transport, Rent & utilities, Shopping, Subscriptions, Health, Travel, Income, Transfers, and Other.

Method 1: by hand, with a dropdown

Best for a month or two of transactions, or when you want to look at every purchase anyway.

  1. Add a Category column next to Description.
  2. Put your category list somewhere on a second sheet, one per cell.
  3. Select the Category column, then Data → Data Validation → Allow: List and point the source at your category cells. In Google Sheets it's Data → Data validation → Dropdown (from a range).
  4. Sort by Description before you start. Repeat merchants end up next to each other, so you can pick the category once and fill it down with Ctrl+D.

It's accurate because you're doing it, but it doesn't scale: a year of card spending is easily a thousand rows.

Method 2: a keyword lookup formula

Most spending is at the same few dozen merchants. If you tell the spreadsheet that anything containing TRADER JOE is Groceries and anything containing UBER is Transport, a formula can categorize most rows for you.

1. Make a rules sheet

Add a sheet called Rules with two columns, Keyword in A and Category in B:

KeywordCategory
TRADER JOEGroceries
KROGERGroceries
UBER EATSDining out
UBERTransport
NETFLIXSubscriptions
PAYROLLIncome

Keywords don't need to match the whole description, and capitalization doesn't matter.

2. Add the formula

Assuming descriptions are in column B starting at row 2, put this in the first Category cell and fill it down. It works in Excel 365 and Excel 2021:

=IFERROR(INDEX(FILTER(Rules!$B$2:$B$200,
    ISNUMBER(SEARCH(Rules!$A$2:$A$200, B2)) * (Rules!$A$2:$A$200<>"")), 1),
  "Uncategorized")

How it works: SEARCH checks every keyword against the description, FILTER keeps the categories whose keyword was found, and INDEX(…, 1) takes the first one. The <>"" part skips empty rows in the rules sheet; without it, a blank keyword would match every description. Rows with no match say Uncategorized.

The first matching rule wins, so put specific keywords above general ones. That's why UBER EATS comes before UBER in the example.

In Google Sheets, give FILTER the two conditions separately:

=IFERROR(INDEX(FILTER(Rules!$B$2:$B$200,
    ISNUMBER(SEARCH(Rules!$A$2:$A$200, B2)), Rules!$A$2:$A$200<>""), 1),
  "Uncategorized")

On Excel 2019 or earlier, which don't have FILTER, use this classic version instead:

=IFERROR(LOOKUP(2^15, SEARCH(Rules!$A$2:$A$200, B2) / (Rules!$A$2:$A$200<>""),
  Rules!$B$2:$B$200), "Uncategorized")

Here the last matching rule wins, so put specific keywords below general ones.

3. Grow the rules from what's left

Filter the Category column to Uncategorized, look at what's there, and add a rule for each merchant that appears more than once. A couple of rounds usually gets you to 80–90% coverage. Categorize the rest by hand.

Where keyword rules struggle

Method 3: categorize automatically

If you'd rather not maintain rules, an AI classifier can read each description the way you would and pick a category from your list. With SheetSorter:

  1. Upload the CSV or Excel export.
  2. Select the Description column, and Amount if you want it to help separate refunds from purchases.
  3. Paste in your categories and preview 10 rows to check them.
  4. Download the file with Category, confidence and "needs review" columns added.

The confidence score is what makes this practical: in our test file, ordinary merchants came back at 98–100%, while a big-box store came back at 42% and was flagged for review. So you only look at the handful of genuinely ambiguous rows.

The two approaches also combine well. Use automatic categorization for the first pass, then add keyword rules in Excel for the merchants you always want treated a particular way.

Which method should you use?

MethodBest forSetupOngoing effort
Dropdown by handUnder ~200 rows5 minutesEvery row, every month
Keyword formulaRegular budgets with repeat merchants30–60 minutesAdd rules for new merchants
AutomaticLarge or messy exports, one-off clean-upsA few minutesCheck flagged rows

Totals by category

Once every row has a category, a PivotTable gives you the budget view: Insert → PivotTable, put Category in Rows and Amount in Values, and add Date to Columns grouped by month. If you prefer a formula, SUMIFS does a single total:

=SUMIFS(Transactions[Amount], Transactions[Category], "Groceries")

Remember that most banks show spending as negative numbers, so totals will come out negative unless you flip the sign with =-SUMIFS(…).

Want to skip the formulas? Upload your bank or credit card export and get a category on every transaction, ready for your budget.

Categorize bank transactions with SheetSorter

More guides