How to Clean Messy Excel and CSV Data Fast

October 23, 2026 · QikAnalytix team

Most analysis time goes into cleaning, not analysis. The export from the ERP has a title row on top, the amounts are text, the dates are in three formats, "North" is spelled four ways and half the cells end in a space you cannot see. This guide covers the five problems that cause most of the trouble, how to fix each in Excel, and how to stop doing it by hand every month.

Step zero: keep the original

Before you change anything, save a copy of the raw file or work on a separate sheet. Cleaning mistakes are easy to make and hard to spot later. Better still, use a method that leaves the source untouched and records each change as a step.

1. Numbers stored as text

Symptoms: SUM returns 0, values align left, a green triangle appears in the corner, pivots count instead of summing.

Causes: currency symbols ($1,200), percent signs, thousands separators that do not match your regional settings, a space used as a thousands separator ("1 200"), a leading apostrophe, or a single "N/A" in the column.

Fixes in Excel:

2. Dates that are not dates

Symptoms: dates sort alphabetically, a timeline chart is impossible, 03/07/2026 means March in one file and July in another.

Fixes in Excel:

Always check a few converted dates by eye. A swapped day and month produces valid but wrong dates, and nothing will warn you.

3. Duplicates

Decide what a duplicate means before deleting anything. Two rows identical in every column are almost always safe to remove. Two rows with the same order ID but different amounts may be a correction, not a duplicate.

4. Trailing spaces and invisible characters

Symptoms: lookups fail on values that look identical, filters show "North" twice, a pivot has two rows for one region.

5. Inconsistent names and spellings

"north", "NORTH", "North" and "Nrth" are four regions to Excel. Some of this is mechanical and some needs judgement.

Two more that catch everyone

Make it repeatable with Power Query

If the same export arrives every week or month, doing the steps above by hand is the real cost. Power Query records each step (remove top rows, change type, trim, replace values, remove duplicates) and replays it when you click Refresh on next month's file. It takes an afternoon to learn the basics and pays back quickly.

Or clean it in one scan

QikAnalytix, the Windows desktop app we build, has a data cleaning wizard aimed at exactly these problems. Load the Excel or CSV file and open Transform > Data cleaning. One scan finds empty cells, duplicate rows, whitespace in values, mixed case variants, numbers stored as text and dates stored as text, and counts every case. It also shows a data quality score: the share of cells with no issue.

QikAnalytix data cleaning wizard listing issues found in a file, each with a count, Preview and Fix

Click Preview on any issue to see before and after samples from your own rows, then Fix it or click Fix all. Some examples of what it does:

IssueBeforeAfter
Whitespace in values" North America ""North America"
Mixed case variantsnorth, NORTH, NorthNorth everywhere (the most common spelling wins)
Numbers stored as text"$1,200", "45%", "1 200"1200, 45, 1200 as a number column
Dates stored as text"03/07/2026", "7-Mar-26"2026-03-07 as a date column
Duplicate rowsTwo identical rowsOne row (the first is kept)
QikAnalytix data cleaning wizard after fixes, showing a data quality score of 91 percent

Tick Keep originals and the fixes go to new columns, with the original values kept next to them. Your file on disk is never changed. Every fix is recorded as a step, so when you replace the file with next month's export, the same cleaning runs again. Remove top rows, Delete rows by criteria, Replace values and a Remove duplicates step with your own compare columns are there for the cases the scan does not cover.

A few honest limits: the duplicate check in the wizard means identical in every column (use a Remove duplicates step to dedupe by an ID), filling empty number cells with 0 changes averages so skip it when blank means "unknown", and codes with leading zeros in a CSV are read as numbers, so keep those as Text cells in an Excel file.

A quick checklist

  1. Keep the raw file untouched.
  2. Remove banner rows and totals rows.
  3. Trim spaces and remove invisible characters.
  4. Fix case and known spelling variants.
  5. Convert numbers and dates, then spot-check them.
  6. Remove duplicates using the columns that define one.
  7. Fuzzy match the names that are still different.
  8. Save the steps so next month takes minutes.

FAQ

Why does Excel treat my numbers as text?

Usually because the export added a currency symbol, a thousands separator, a leading apostrophe, a stray space or a value like N/A. Remove those characters, then convert with VALUE, Text to Columns, or a Change Type step in Power Query.

How do I stop CSV files losing leading zeros?

Do not open the CSV by double-clicking. Import it with Data > From Text/CSV and set the column type to Text, or keep codes such as ZIP codes as Text cells in an Excel file. Once the zeros are gone, Excel cannot know how many there were.

How can I clean the same export every month without redoing the work?

Record the cleaning as steps that replay on refresh. Power Query does this in Excel, and desktop tools such as QikAnalytix record every cleaning fix as a step that runs again when you replace or refresh the source.

Have a messy export on your desk right now? Try QikAnalytix free for 7 days and clean it in one scan. It runs 100% offline on Windows, your original file is never changed, and no credit card is needed.