Data & architecture

Data cleaning: what it actually involves

A spreadsheet lands in your inbox with three different spellings of the same customer name, a date column that mixes DD/MM and MM/DD, and a handful of rows where the postcode field somehow holds a phone number. Someone has to sort it before the report goes out, and that someone is doing data cleaning, whether they call it that or not. It rarely earns a line in the project plan, yet almost every analysis, dashboard and AI model is waiting on it happening properly first.

Data cleaning is the process of finding and fixing errors, inconsistencies and gaps in a dataset so it can be trusted for analysis or automation. That covers removing duplicates, standardising formats, correcting mistyped values, and deciding what to do with missing or contradictory entries before anything downstream relies on the numbers.

What data cleaning actually means

Strip away the jargon and data cleaning is a fairly ordinary set of tasks. You are looking for the same record entered twice under slightly different names, dates stored in three formats across one column, numbers typed as text so they will not sum, blank fields where a value should be, and outliers that are either a genuine anomaly or someone's typo.

None of that is glamorous, which is exactly why it gets skipped or rushed. But every one of those small faults compounds once the data feeds a report, a forecast, or a model. A model trained on inconsistent categories learns the inconsistency, not the pattern you wanted it to find.

Why data cleaning matters more than it looks

The reason data cleaning keeps coming up is not that it is difficult in principle, it is that skipping it is invisible right up until it is not. A dashboard built on duplicated rows overstates revenue quietly, for months, until someone reconciles it against the ledger and asks why the numbers do not match.

It matters even more once AI enters the picture, because a model has no instinct that something looks wrong. It will happily learn from a column where half the entries say "N/A" and half are blank, treating them as different things when they mean the same thing. Clean input is the difference between a model that generalises and one that memorises noise.

There is also a compliance angle worth naming. If customer records contain duplicate or contradictory entries, a subject access request or an audit can turn into a slow, manual scramble rather than a five-minute lookup.

The core steps of a data cleaning process

Most data cleaning work follows a similar shape regardless of the tool. First, profile the data: look at each column's range, format and null rate before touching anything, so you know what you are dealing with rather than guessing. Second, deduplicate, deciding what counts as the same record and which version to keep when two disagree.

Third, standardise formats, so dates, currencies, units and free-text categories ("Ltd", "Limited", "LTD.") collapse into one consistent representation. Fourth, handle missing values deliberately, choosing between leaving a flagged gap, imputing a sensible default, or excluding the record, rather than letting a spreadsheet silently treat blank as zero.

Finally, validate against rules that reflect reality, such as a delivery date that cannot precede an order date, and keep a record of what was changed and why. That last part is the step people skip most often, and the one that saves the most time when someone later asks how a figure was produced.

Cleaning data in Excel

Excel is where most people first meet data cleaning, and for a single file with a few thousand rows it is often the right tool. Remove Duplicates handles the obvious repeats, Text to Columns splits combined fields like "Smith, John" into separate columns, and Flash Fill can spot a pattern, such as reformatting phone numbers, and apply it down an entire column in one go.

Conditional formatting is worth setting up before you start correcting anything, since highlighting blanks, text-in-a-number-column, or values outside an expected range shows you the scale of the problem at a glance rather than after the fact. Power Query, built into modern Excel, goes further: it lets you record a cleaning process as a repeatable set of steps rather than a one-off manual edit, so the same workbook can be refreshed against new data without redoing the work.

Where Excel runs out of road is scale and repeatability across many files. Manual formulas and copy-paste steps do not survive a source file changing shape, and there is no audit trail beyond whatever you remember to write down yourself.

Tools for data cleaning beyond a spreadsheet

Once volume or frequency grows, purpose-built tools take over. OpenRefine is a free tool built specifically for messy, inconsistent data, particularly good at clustering near-duplicate text values ("NY", "N.Y.", "New York") so you can merge them in one pass rather than hunting for each variant. For anyone comfortable with code, Python's pandas library turns cleaning steps into a script you can rerun on every new export, which matters as soon as the same problem shows up more than once.

At the platform level, tools built into modern warehouses, such as dbt tests in Snowflake or Databricks, run automated checks (uniqueness, not-null, referential integrity) every time data is loaded, so problems surface the moment they appear rather than months later in a stakeholder's report. Dedicated data quality platforms add monitoring and alerting on top, flagging when a field's error rate jumps rather than waiting for someone to notice.

The right tool depends on how often the data changes and how many people depend on it. A one-off analysis can live in Excel. A pipeline feeding a live dashboard or a production model needs something that runs the checks automatically, every time.

Common data cleaning mistakes

The most common mistake is treating data cleaning as a single event rather than an ongoing discipline. Data drifts: a new sales system introduces a different date format, a form field changes its options, and last quarter's cleaning script silently stops matching what is coming in now.

A close second is deleting rather than flagging. Removing an odd-looking row without recording why can hide a genuine problem in the source system that would otherwise have been caught and fixed at the source. Over-automating without review causes the opposite problem: a script that "fixes" every mismatched category can just as easily erase a real distinction that mattered.

The third is doing it once, downstream, instead of closer to where the data is created. Cleaning the same errors out of a report every month is a sign the fix belongs further upstream, in the system generating the data, not in the spreadsheet receiving it.

Making data cleaning routine, not a one-off

The teams that stop firefighting dirty data are the ones that build checks into the pipeline itself, so bad records get caught on the way in rather than discovered on the way out. That means validation rules living next to the data, not in someone's memory, and a clear owner for what happens when a check fails.

It also means treating the cleaning logic as something to maintain, not a script you wrote once and forgot about. Source systems change, and a cleaning process that assumes last year's formats will quietly start passing bad data through as unnoticed as it once caught it.

This is where the wider architecture matters as much as the technique. Getting there usually means building a reliable data foundation the rest of the business can trust, one where cleaning rules are documented, versioned and applied consistently across every source rather than reinvented per spreadsheet.

When to bring in outside help

Some organisations run data cleaning entirely in-house, and for a small, stable dataset that is often perfectly workable. It stops being workable once the data comes from many sources, changes shape often, or feeds something with real consequences, a regulatory report, a customer-facing model, a set of financial figures.

That is usually when data cleaning services or an outside data team earn their keep, not because the cleaning itself is exotic, but because getting the rules right across a genuinely messy, real-world estate takes time most internal teams do not have spare. A short, focused engagement to map the mess and set up repeatable checks often pays for itself the first time it prevents a bad number reaching a board pack.

Frequently asked questions

What is data cleaning?

Data cleaning is the process of finding and correcting errors, duplicates, inconsistent formats and missing values in a dataset before it is used for analysis, reporting or automation. It covers everything from merging duplicate customer records to standardising date formats so a spreadsheet, dashboard or model can be trusted to reflect reality rather than the mess it started as.

Why is data cleaning important?

It is important because errors left uncleaned do not stay contained, they compound as data moves downstream into reports, dashboards and models that other people rely on to make decisions. A model or report built on dirty data will look fine on the surface while quietly giving wrong answers, and the problem usually only surfaces once someone reconciles it against another source.

How do you clean data?

A typical process starts by profiling the data to see its range, format and null rate, then deduplicating records, standardising formats such as dates and currencies, deciding deliberately how to handle missing values, and finally validating the result against rules that reflect how the business actually works. Keeping a record of what was changed and why makes the whole process repeatable rather than a one-off fix.

How do you clean data in Excel?

Excel's Remove Duplicates, Text to Columns and Flash Fill handle the most common fixes, such as repeated rows and split or reformatted fields, while conditional formatting helps spot blanks and mismatched values before you start correcting them. For anything you will need to repeat on new data, Power Query lets you record the cleaning steps once and reapply them automatically rather than redoing the work by hand each time.

What tools are used for data cleaning?

Beyond Excel, common choices include OpenRefine for clustering and merging messy text values, Python's pandas library for scripting repeatable cleaning steps, and automated checks built into modern data warehouses like Snowflake or Databricks that validate data as it loads. Which tool fits depends mainly on how often the data changes and how many people or systems depend on the result being right.

Want a straight view of where AI can help your business first? Talk to us and start with a clear picture instead of a vendor demo.

Start at your core.

Tell us where your data is today and what you want AI to do. We will come back with a straight answer on what your foundation needs and where the quickest real win is.

Talk to us