Save hours every week
Turn your bank statements (PDF) into Excel, CSV or OFX, without manual retyping.
To categorize bank transactions in Excel, put the rows in an Excel Table, add a Category column that looks up each description in a small Rules table with XLOOKUP, and send anything unmatched to “Needs review”. Then build a PivotTable with the category in Rows, the date grouped by month in Columns, and Sum of Money Out in Values, and check its totals against the statement.
This guide walks through that workbook with a fictional nine-row example whose totals you can verify by hand. Start with your bank’s CSV download when it covers the period. If you only have a statement PDF or a scan, convert the bank statement to an Excel table with a bank statement converter that handles PDFs and images, then compare the rows with the original before you categorize. For PDF-first workflows and suggested categories, see the guide to automated transaction categorization.
The worked example used in this guide
The rows below are sample data, not a real account. They cover one US checking account, labeled Operating, for January and February 2026, with an opening balance of $5,000.00 on January 1.
| Date | Description | Money In | Money Out | Account | Currency |
|---|---|---|---|---|---|
| 2026-01-03 | ACME CLOUD HOSTING | 89.00 | Operating | USD | |
| 2026-01-06 | CITY RAIL 1042 | 42.50 | Operating | USD | |
| 2026-01-10 | CLIENT ALPHA INV-118 | 2,400.00 | Operating | USD | |
| 2026-01-15 | BANK SERVICE FEE | 15.00 | Operating | USD | |
| 2026-01-28 | TRANSFER TO SAVINGS | 500.00 | Operating | USD | |
| 2026-02-03 | ACME CLOUD HOSTING | 89.00 | Operating | USD | |
| 2026-02-11 | CITY RAIL 2210 | 63.75 | Operating | USD | |
| 2026-02-15 | BANK SERVICE FEE | 15.00 | Operating | USD | |
| 2026-02-20 | NORTHWIND SUPPLIES | 120.40 | Operating | USD |
By the end, the workbook has three parts: this Transactions table with a category on every row, a Rules table you can audit, and a PivotTable of outflows by category and month. Excel applies the rules you write; it does not decide the accounting or tax treatment of a payment.
Step 1: get the transactions into Excel and check them
A native bank CSV is the cleanest source because it skips an extraction step and often keeps columns a printed statement leaves out. When only a PDF, JPEG, PNG, or WebP statement is available, convert it to Excel (or CSV), keep the original as evidence, and check these points before you add a single category:
- opening balance plus money in minus money out equals the closing balance;
- the first and last transactions of the period are present;
- dates, signs, decimal separators, and currencies are correct;
- multi-line descriptions stay attached to the right amounts;
- no headers, footers, or carried-forward balances became transactions.
In the example, $5,000.00 + $2,400.00 − $646.50 gives a January closing balance of $6,753.50, and $6,753.50 − $288.15 gives $6,465.35 at the end of February. If your converted file does not reproduce the balances printed on the statement, fix the rows first; categories cannot repair a missing transaction. The general PDF-to-spreadsheet conversion guide has a longer review checklist.
Step 2: format the rows as an Excel Table
Keep one header row and one transaction per row, with Money In and Money Out as numbers. Select the range, choose Insert > Table (or Home > Format as Table), confirm that the first row holds headers, and name the table Transactions on the Table Design tab.
A Table matters for two reasons. A formula entered in one cell of a column is applied to the whole column, and Microsoft notes that typing in the row directly below the last row expands the table to include it. Next month’s rows therefore get their categories without copying formulas down.
Do not merge cells, insert subtotal rows, or mix currencies without a Currency column. If you combine several accounts, keep an Account column so transfers between them can be found instead of counted as income or spending.
Step 3: set up a Rules table and a category list
There is no universal category list. Categories depend on the business, the chart of accounts, and the question the pivot has to answer, so treat the list as an internal analysis structure, not tax advice. A small operating view might use Client receipts, Rent and premises, Payroll and contractors, Software, Marketing, Travel, Office supplies, Bank and payment charges, Taxes paid, Owner movements, Loan movements, Transfers, and Needs review.
On a Rules sheet, create an Excel Table named Rules. For the example:
| Priority | Keyword | Category | Note |
|---|---|---|---|
| 10 | ACME CLOUD | Software | Monthly hosting |
| 20 | CITY RAIL | Travel | Confirm business purpose |
| 30 | BANK SERVICE | Bank and payment charges | |
| 40 | CLIENT ALPHA | Client receipts | Check the customer payment record |
| 50 | TRANSFER TO SAVINGS | Transfers | Own-account movement |
Sort the table by Priority yourself; the numbers do not sort it automatically. Prefer specific keywords such as CITY RAIL over broad ones such as PAYMENT, which would catch unrelated rows. To keep category spelling consistent in manual entries, put the category list on its own sheet and apply data validation to cells with that list as the source.
Step 4: add the Category column with XLOOKUP
In Microsoft 365, Excel 2021, or Excel 2024, add a RuleMatches column to Transactions. It counts how many non-blank keywords appear in the description:
=SUMPRODUCT(--(Rules[Keyword]<>""),--ISNUMBER(SEARCH(Rules[Keyword],[@Description])))
Then use this formula in Category:
=IF([@RuleMatches]<>1,"Needs review",XLOOKUP(1,(Rules[Keyword]<>"")*ISNUMBER(SEARCH(Rules[Keyword],[@Description])),Rules[Category],"Needs review"))
Only a single matching rule assigns a category; zero or several matches return Needs review. That guard matters because XLOOKUP returns the first match it finds: if you add both ACME and ACME CLOUD, the row ACME CLOUD HOSTING matches two rules, and the formula flags the ambiguity instead of quietly picking one. SEARCH is not case-sensitive and treats * and ? as wildcards, so keep keywords plain. The formulas use English function names and comma separators; some Excel locales need translated names or semicolons.
In the example, eight rows match exactly one rule. NORTHWIND SUPPLIES matches none and shows Needs review.
Add ManualCategory for reviewed decisions and FinalCategory for the value the reports use:
=IF([@ManualCategory]<>"",[@ManualCategory],[@Category])
Then a Review flag:
=IF(OR([@FinalCategory]="",[@FinalCategory]="Needs review"),"Needs review","")
Filter Review = Needs review, check each row against invoices or receipts, and type the decision in ManualCategory so a later rule change does not overwrite it. In the example, the Northwind receipt shows printer paper, so ManualCategory becomes Office supplies. Add a new keyword to Rules only when it will reliably describe future transactions.
When VLOOKUP is appropriate
Microsoft states that XLOOKUP is not available in Excel 2016 and Excel 2019. In those versions, VLOOKUP can map an exact normalized merchant key to a category. Add a NormalizedMerchant column to Transactions and a two-column table named ExactRules, with Normalized Merchant first and Category second:
=IFERROR(VLOOKUP([@NormalizedMerchant],ExactRules[[Normalized Merchant]:[Category]],2,FALSE),"")
The lookup column must be the first column of that range, as the VLOOKUP reference explains. A formula that looks up "*"&[@Description]&"*" searches in the wrong direction: it does not test whether a rule keyword sits inside a longer description. Use the SEARCH and XLOOKUP approach for keyword-within-description matching.
Step 5: review transfers, credits, and mixed-purpose rows
Keyword rules handle repetition; these rows need a deliberate decision:
- Transfers between your own accounts: tag both sides consistently and keep them out of operating income and expense totals.
- Loan proceeds and principal payments: separate financing movements from operating activity.
- Merchant credits and reversals: link them to the original category instead of treating them as new revenue.
- Payroll: confirm whether the bank amount is a net payroll settlement while taxes and other liabilities sit elsewhere.
- Mixed-purpose purchases: keep the supporting document and record only the supported business portion.
- Unknown deposits: identify the source from invoices, settlement reports, or contracts; the bank description alone may not prove it.
For US businesses, the IRS notes that supporting documents may need to be combined to show the payee, amount, date, and business purpose. Its business recordkeeping guidance is a useful reference; follow the rules for your own jurisdiction.
Step 6: build the PivotTable by month and category
Click any cell in the Transactions table and choose Insert > PivotTable. Excel fills in the table name; choose New Worksheet and confirm. Microsoft’s guide to creating a PivotTable covers the dialog on Windows, Mac, and the web.
Set up the fields:
- Rows: FinalCategory
- Columns: Date
- Values: Money Out, summarized as Sum
- Filters: Account and Currency
Recent versions of Excel may add date hierarchy fields such as Years and Months when you drop Date into Columns. If yours shows individual days, right-click a date in the PivotTable, choose Group, select Months and Years under By, and click OK, as described in grouping data in a PivotTable. Keep Years whenever the data crosses a calendar year, or January 2026 and January 2027 will be added together.
Open the FinalCategory filter arrow in the PivotTable and clear Transfers and Client receipts, so the report shows spending only. With the Northwind row reviewed, the example gives:
| FinalCategory | Jan | Feb | Grand Total |
|---|---|---|---|
| Bank and payment charges | 15.00 | 15.00 | 30.00 |
| Office supplies | 120.40 | 120.40 | |
| Software | 89.00 | 89.00 | 178.00 |
| Travel | 42.50 | 63.75 | 106.25 |
| Grand Total | 146.50 | 288.15 | 434.65 |
Before the review, the same pivot shows a Needs review row of 120.40 in February instead of Office supplies. Leaving Needs review visible in the report, rather than filtering it out, keeps unfinished work from disappearing into a total.
If Values shows Count of Money Out, check whether some amounts were stored as text, convert them to numbers, then open Value Field Settings and choose Sum under Summarize Values By. A Money Out pivot shows gross outgoing cash: a merchant refund recorded in Money In does not reduce it. For net spending, build a separate reviewed measure that subtracts refunds within the same expense category.
Step 7: add slicers and a timeline
Slicers turn the filters into buttons. Click anywhere in the PivotTable, choose Insert > Slicer (in Excel for the web, PivotTable Analyze > Slicer), tick Account and FinalCategory, and click OK. Selecting Travel in the slicer then shows $106.25 across both months; Clear Filter brings every category back. Microsoft describes these steps in using slicers to filter data.
For dates, a timeline is easier to read than a filter list. With the PivotTable selected, choose Insert Timeline on the PivotTable Analyze tab (labeled Analyze in older versions), tick Date, and click OK. The PivotTable timeline switches between years, quarters, months, and days, so you can show one quarter with a single drag.
Useful companion pivots on the same table include inflows by source and month, outflows by account and category, a count of rows still in Needs review, and owner, loan, and transfer movements in a separate financing view.
Step 8: refresh the PivotTable when new transactions arrive
A PivotTable does not recalculate like a formula. After you paste new rows below the Transactions table or change a rule:
- select the PivotTable;
- on the PivotTable Analyze tab, choose Refresh, or press Alt+F5 (right-click > Refresh also works);
- use the Refresh arrow > Refresh All when several pivots share the workbook;
- optionally, under PivotTable Analyze > Options > Data, tick Refresh data when opening the file.
These options are listed in Microsoft’s refresh PivotTable data article. If each month’s bank export has the same columns, Power Query can also import data from a folder with multiple files and append them into one table. Keep only same-layout files in that folder, then refresh the rules, the pivots, and the checks below.
Step 9: check the pivot totals against the statement
A pivot summarizes the rows it receives. It does not detect a missing statement, a duplicated transaction, a wrong sign, or a bad rule, so add a small control sheet and compare it with the printed statement each month:
| Control | Example result |
|---|---|
| Transaction count | 9 rows imported, 9 rows on the two statements |
| Total money in | $2,400.00, equal to January statement credits |
| Total money out, all categories | $646.50 in January and $288.15 in February, equal to statement debits |
| Money out in the spending pivot | $434.65, equal to $934.65 of debits minus the $500.00 transfer |
| Rows in Needs review | 0 after the Northwind decision |
| Transfer pairs | The $500.00 transfer matches a $500.00 credit on the savings statement |
| Currency and account | USD only, Operating only |
If a figure does not agree, find the row before you change a category. Record who reviewed the exceptions and when, and keep a copy of the original import.
Excel rules versus automated categorization
Excel rules suit a stable set of merchants that you want to control line by line. When descriptions change often, or the transactions start as PDF statements, the guide to automated transaction categorization compares other methods. Review the resulting labels before you refresh the PivotTable.
BankStatementLab turns supported statement PDFs and images into Excel, CSV, or OFX rows for this analysis. Without an account, the preview processes the first two pages of one file; new accounts include 5 credits, and 1 credit is 1 page. To check the categorized transactions against your books, its separate bank reconciliation report compares processed statements with an accounting export, suggests matching pairs, and keeps unmatched items visible. Your category policy and supporting documents still decide classification; matching a payment does not assign its tax treatment.
Frequently asked questions
How do I categorize bank transactions in Excel?
Put the transactions in an Excel Table, list keywords and categories in a separate Rules table, and add a Category column that uses SEARCH and XLOOKUP to return the matching rule. Rows with no match or several matches show Needs review. Record manual decisions in a ManualCategory column, then build a PivotTable on the final category.
Can a PivotTable categorize transactions on its own?
No. A PivotTable summarizes the values already in its source rows, so the category has to exist as a column before you build it. Add the Category column with rules or manual review, refresh the PivotTable, and it totals Money Out by category and month.
Why does my PivotTable count amounts instead of adding them?
Check whether some amounts were stored as text instead of numbers, and convert them, checking the decimal separator if the file came from another locale. Then open Value Field Settings on the Money Out field and choose Sum under Summarize Values By.
How do I add next month’s transactions without rebuilding the PivotTable?
Type or paste the new rows directly below the last row of the Transactions table so the table expands and its formula columns fill in. Then select the PivotTable and choose Refresh on the PivotTable Analyze tab, or press Alt+F5. Check the new month’s control totals before you use the report.
Does this method work in Excel 2016 or 2019?
The XLOOKUP formula does not, because Microsoft states that XLOOKUP is not available in Excel 2016 and Excel 2019. In those versions, put a normalized merchant name in its own column and use an exact-match VLOOKUP against a two-column rules table. The Table, PivotTable, grouping, and slicer steps still apply.
Can I use a PDF bank statement instead of a CSV export?
Yes, once the rows are in a spreadsheet. Use your bank’s CSV download when it covers the period; otherwise convert the statement PDF to Excel with BankStatementLab and check the rows against the original before you categorize. Without an account, the preview processes the first two pages of one file; new accounts include 5 credits, and 1 credit is 1 page.
Related articles
- Analyze cash-flow warning signs in bank statements
- Review automatic transaction categorization
- How to Prepare Bank Statements for Your Accountant
- Why Bank Statement Layouts Break Generic Parsers
Convert a supported bank statement into reviewable Excel rows with BankStatementLab
Ready to simplify your accounting?
Eliminate manual entry and focus on analysis and advisory.