{
  "id": 22922918,
  "title": "How to clean a bank statement CSV in Excel's query editor, step by step",
  "url": "https://urgent.news/2026/12/01/how-to-clean-a-bank-statement-csv-in-excels-query-editor-step-by-step",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-01T08:00:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bankstatementscan/how-to-clean-a-bank-statement-csv-in-excels-query-editor-step-by-step-3gfn"
  },
  "original_language": null,
  "account": "To clean a bank statement CSV in Excel's query editor, follow these steps:\n\n1. Import the CSV file using Data > From Text/CSV instead of Load. Set the file origin to Unicode (UTF-8) unless the bank uses a different encoding. Check the delimiter (comma, semicolon or tab) and ensure descriptions are quoted correctly. Avoid relying on visible commas for column count.\n\n2. Delete the automatic type-detection step before it processes your data. In the query editor, change the reference column to Text and the booking date column to Date using the bank's locale. Set the amounts column to Decimal Number with the correct decimal mark.\n\n3. Why delete the automatic type step? In the query editor, identify any columns set to Whole Number. Manually adjust the type to Text if needed, as whole-number type can cause loss of important digits when loaded into the sheet.\n\n4. Assign the appropriate type to each column: Reference and account number as Text, Booking date as Date with the correct locale, Amount as Decimal Number with the matching locale, and Description as Text. This order is crucial because most errors occur early.\n\n5. Clean amounts without affecting descriptions. Replace non-breaking spaces (U+00A0), narrow non-breaking spaces (U+202F) and ordinary spaces in the amount column. Convert the amounts using the source locale. Never remove all spaces from the entire table, as this removes necessary formatting from descriptions and references.\n\n6. If your export includes separate debit and credit columns, add a conditional column to negate debits and keep credits positive. Filter the null values into a review list. Use the formula: =IF(AND(ISNUMBER(C2),C2 0,ISBLANK(D2)),-C2,IF(AND(ISBLANK(C2),ISNUMBER(D2),D2 0),D2,\"check\")) in the sheet.\n\n7. To verify the loading process, load the cleaned data to a new sheet. Compare the row count, first and last rows, and debit/credit totals with the original statement. Save the working copy as XLSX to preserve column types. Test the recipe using a sample file with known data and expected results.",
  "summary": "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…",
  "summary_source": "publisher",
  "key_points": [
    "Import CSV with UTF-8 encoding, correct delimiter, and quoted descriptions",
    "Change reference, booking date, and amounts columns to Text, Date, and Decimal Number respectively",
    "Clean amounts by replacing non-breaking spaces and convert using source locale"
  ],
  "editors_take": "Manually setting data types prevents the loss of important digits and ensures that bank transaction descriptions and account numbers remain accurate after the import process.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}