Lanternhill Studio · Bank CSV Categorizer

How to Categorize Bank Transactions in Google Sheets

You can sort a bank export into categories in Google Sheets with one rules tab and one formula. Here's the method.

1. Import the CSV

File → Import → Upload, choose your bank CSV, and pick "Insert new sheet". Name the sheet Transactions. Make sure amounts are numbers (Format → Number) and dates are real dates.

2. Make a Rules tab

Add a sheet named Rules with a keyword in column A and a category in column B, e.g. AMAZON | Supplies, SHELL | Fuel / Auto, STRIPE | Income. Put the more specific keywords higher up.

3. Add the category formula

If descriptions are in column B, put this in E2 and fill down:

=IFERROR(INDEX(Rules!B:B, MATCH(TRUE, ARRAYFORMULA(REGEXMATCH(UPPER(B2), UPPER(Rules!A$2:A$50))), 0)+1), "Uncategorized")

It returns the category for the first keyword found in the description. Empty rows in the rules range can match everything, so keep the range tight or fill it completely.

4. Review the leftovers

Filter column E for "Uncategorized", fix those by hand or add new keywords. Transfers between your own accounts should get their own category so they don't count as income or expenses.

5. Total it with a pivot table

Insert → Pivot table, rows = Category, values = SUM of Amount. Add a month column with =TEXT(A2,"yyyy-mm") and use it as pivot columns for a month-by-month view.

Prefer not to build it? Our free Bank CSV Categorizer does the same steps in your browser and exports an XLSX you can open in Sheets.

Frequently asked questions

Can Google Sheets categorize bank transactions automatically?

Yes, with a Rules tab of keywords and categories and one REGEXMATCH/INDEX/MATCH formula that returns the category for the first keyword found in each description. Anything without a match shows as Uncategorized for you to review.

How should I handle transfers between my own accounts?

Give them their own category, such as Transfers, so they are not counted as income or expenses.

How do I see totals by category and month?

Insert a pivot table with Category as rows and SUM of Amount as values. Add a month column with =TEXT(A2,"yyyy-mm") and use it as the pivot columns.

Want more than a quick fix?

Just starting out? Grab the free Starter Expense Tracker (pay what you want, $0 is fine).

Guides