To clean a bank statement CSV in Excel's query editor, import it with Data > From Text/CSV, choose Transform Data instead of Load, and delete the automatic type-detection step before it touches your references. Then type every column yourself: references as Text, dates with the bank's locale, amounts as Decimal Number with the right decimal mark.
That order matters because most damage happens in the first second. A double-click lets Excel guess every column with your computer's regional settings: a reference loses its leading zeros, a 16-digit card reference ends in 0, and 03/04 can become the wrong month. The recipe below replaces guessing with decisions you can check.
Step 1: what does the raw file actually contain?
Copy the downloaded CSV and work on the copy. Open it once in a plain-text editor and note the delimiter (comma, semicolon or tab), whether descriptions are quoted, and how dates and amounts are written. A comma inside a quoted description belongs to that field, so counting visible commas is not a reliable way to count columns.
Step 2: which encoding and delimiter should the import use?
In a blank workbook, go to Data > From Text/CSV and select the copy. Set File origin to 65001: Unicode (UTF-8) unless the bank documents another encoding. If names look like Café, the encoding is wrong. If everything lands in one column, the delimiter is wrong, not the file.
Step 3: why delete the automatic type step?
In the query editor, look at the step that detects column types automatically. If it has set the reference column to Whole Number, delete it or change the type inside it; adding a Text step after it is too late. A whole-number type can look intact in the editor and still lose its 16th digit once loaded into the sheet.
Step 4: which type does each column need?
| Column | Type | Why |
|---|---|---|
| Reference, account number | Text | Identifiers are never summed; Excel keeps only 15 significant digits in numbers |
| Booking date | Date, set with the locale option | 03/04/2026 is ambiguous until you pick the bank's order |
| Amount | Decimal Number, with the matching locale | Sums need real numbers and a known decimal mark |
| Description | Text | Keeps spaces, quotes and accents as printed |
Step 5: how do you clean amounts without touching descriptions?
Replace only in the amount column: the non-breaking space (U+00A0), the narrow non-breaking space (U+202F) and the ordinary space, then convert with the locale of the source. Never run a "remove all spaces" step on the whole table: descriptions and references keep theirs.
If the export has separate debit and credit columns, add a conditional column that returns the debit negated when only a positive debit is present, the credit when only a positive credit is present, and null otherwise. Filter the nulls into a review list. In the sheet, the same rule reads:
=IF(AND(ISNUMBER(C2),C2>0,ISBLANK(D2)),-C2,IF(AND(ISBLANK(C2),ISNUMBER(D2),D2>0),D2,"check")) Step 6: how do you know the load worked?
Load to a new sheet, then compare the row count with the data lines of the raw file, the first and last rows, and the debit and credit totals with the statement. Save the working copy as XLSX: a CSV stores no column types, so the next person who double-clicks it repeats every conversion.
A fictional file to test the recipe
date,reference,description,amount 2026-09-18,00123,"Café, morning",-19.80 2026-09-19,1234567890123451,"Transfer ""TEST""",50.00 2026-09-20,1234567890123452,Monthly fee,-2.20 Expected after loading: Café readable, four columns, 00123 still five characters, the two long references distinct, debits 22.00, credits 50.00, net +28.00. If both long IDs turn into 1234567890123450, the totals still say +28.00, so check the references themselves.
Read the full guides
- Import a bank statement CSV into Excel: delimiters, quoting rules and a full import trial table.
- Leading zeros and 15-digit references in Excel: how to tell a display problem from lost digits.
- Amounts stored as text with invisible spaces: a worked example with five extracted amounts.
- Combine debit and credit columns: the decision table for doubtful rows.
BankStatementScan turns scanned or PDF bank statements into Excel rows that you review beside the source page. Get started
