Quick Answer The 13-step Excel data cleaning sequence is: (1) backup the raw data, (2) remove duplicates, (3) fix blank cells, (4) remove extra spaces with TRIM, (5) fix inconsistent capitalisation with PROPER, (6) standardise category values with Find & Replace, (7) convert text-numbers to numbers with VALUE, (8) fix dates stored as text, (9) split combined columns with Text to Columns or Flash Fill, (10) remove unnecessary columns, (11) fix outliers and impossible values, (12) add data validation to prevent future errors, (13) document what you changed. Follow this order β€” skipping steps or doing them out of order creates new problems.

Why Data Cleaning Matters

Data analysts spend 60–80% of their time on data preparation and cleaning. That is not a complaint β€” it is reality. Raw data from CRMs, ERPs, survey tools and exported spreadsheets rarely arrives in a form that is ready for analysis. Duplicate records inflate counts. Text-formatted numbers break SUM formulas. Inconsistent category names like "north", "NORTH" and "North " produce three separate groups in a PivotTable instead of one.

Every error in your source data is an error in your analysis. No formula or chart can correct bad source data β€” it can only hide it temporarily. This guide walks you through 13 steps that transform a realistic messy dataset into one that is ready for analysis.

What Messy Data Looks Like

Here is a sample of the kind of messy customer sales data you will encounter in real work:

OrderIDCustomerNameRegionOrderDateAmountStatus
1001 sreemathy sampathnorth15-09-202612500completed
1002Ravi KumarSOUTHSeptember 16 20268,750Completed
1001sreemathy sampathnorth15-09-202612500completed
1003Priya SEast17/09/26'9200PENDING
1004West 18-Sep-2026-500cancelled
1005Arun MNrth19/09/202615000Completed

Problems visible in this small sample: duplicate row (OrderID 1001 appears twice), leading space in "sreemathy sampath", inconsistent region capitalisation (north, SOUTH, East, West ), extra spaces ("Priya S"), wrong date formats (four different formats across six rows), number stored as text ('9200), negative Amount (-500), and a typo ("Nrth" instead of "North"). A real dataset of 5,000 rows will have all of these problems and more.

Step 1 Backup the Raw Data

Before touching anything: right-click the sheet tab, select Move or Copy, check "Create a copy", and put it in the same workbook as "RAW_DATA – Do Not Edit". Lock the sheet if possible (Review β†’ Protect Sheet).

This is not optional. Data cleaning steps are irreversible. You will make mistakes. You need a reference copy to check against or revert to.

Step 2 Remove Duplicates

Go to Data β†’ Remove Duplicates. Select the columns that together define a unique record. For our sample, OrderID alone is the unique key β€” select only OrderID. Click OK. Excel tells you how many duplicates were removed and how many unique rows remain.

Be careful with "select all columns" in Remove Duplicates β€” two rows that are truly duplicate are identical across all columns. If even one column differs (e.g., a timestamp with milliseconds), Excel will not treat them as duplicates even if they represent the same business event.

After removing duplicates, use =COUNTIF($A$2:$A$1000,A2) on a helper column to verify β€” any value greater than 1 means that OrderID still appears more than once.

Step 3 Find and Fix Blank Cells

Select your data range. Press Ctrl+G β†’ Special β†’ Blanks β†’ OK. Excel selects all blank cells. Now decide: fill with a default value ("Unknown", "N/A"), delete those rows, or flag them for follow-up.

To fill all blanks with "Unknown": with all blanks selected, type "Unknown" and press Ctrl+Enter β€” Excel fills all selected cells simultaneously.

Use =COUNTBLANK(A2:A1000) to check how many blanks exist in a column before and after cleaning.

Step 4 Remove Extra Spaces β€” TRIM and CLEAN

Extra spaces are invisible and break lookup formulas and PivotTable grouping. Apply TRIM to every text column.

In a helper column next to CustomerName:

=TRIM(CLEAN(B2))

CLEAN removes non-printable characters (common in data pasted from PDFs or web pages). TRIM removes leading, trailing and double-internal spaces.

After checking the helper column looks correct: copy it, then Paste Special (Ctrl+Shift+V) β†’ Values Only over the original column. Delete the helper column.

Apply the same process to every text column: Region, Status, CustomerName.

Step 5 Fix Capitalisation

Use PROPER for names and most text: =PROPER(B2) β†’ "Sreemathy Sampath"

Use UPPER for codes and categories where all-caps is the standard: =UPPER(F2) β†’ "COMPLETED"

Use LOWER when the standard is lowercase: =LOWER(F2) β†’ "completed"

Decide on a standard and apply it consistently across the dataset.

Step 6 Standardise Category Values

After TRIM and PROPER, check your Region column for remaining inconsistencies. In our sample, "Nrth" is a typo that TRIM and PROPER cannot fix β€” it needs a Find and Replace.

Press Ctrl+H. In "Find what": Nrth. In "Replace with": North. Click Replace All.

For more complex standardisation, create a mapping table on a separate sheet:

Original ValueStandard Value
nrthNorth
northNorth
NNorth
southSouth
SOUTHSouth

Then use XLOOKUP or VLOOKUP against this mapping table to replace messy values with standard ones in a helper column.

Step 7 Fix Numbers Stored as Text

A number stored as text sits left-aligned in its cell (numbers are right-aligned by default) and has a small green triangle in the corner. SUM on a column of text-numbers returns 0.

In our sample, Amount has '9200 β€” the apostrophe forces Excel to treat it as text.

Fix options:

After converting, verify with =ISNUMBER(E2) β€” should return TRUE for all cells.

Step 8 Fix Dates Stored as Text

Our sample has four different date formats across six rows. This is extremely common when data comes from multiple sources or is entered manually.

Dates stored as text are left-aligned. Proper Excel dates are right-aligned and have a numeric value underneath (Excel stores dates as sequential numbers β€” 45900 is September 15, 2026).

Fixes:

After conversion, format the column as Date (Ctrl+1 β†’ Number β†’ Date) and verify all cells show dates, not numbers.

Step 9 Split Combined Columns

Sometimes a single column contains data that belongs in two columns β€” "FirstName LastName" in one cell, or "City, State" combined.

Text to Columns: Select the column β†’ Data β†’ Text to Columns β†’ Delimited β†’ choose the separator (space, comma) β†’ Finish. This splits the column in place.

Flash Fill: Type the desired result in the first cell of a new column (e.g., "Sreemathy" in a column next to "Sreemathy Sampath"). Press Ctrl+E. Excel detects the pattern and fills the rest of the column.

Formula approach: =LEFT(B2,FIND(" ",B2)-1) for first name, =MID(B2,FIND(" ",B2)+1,100) for last name.

Step 10 Remove Unnecessary Columns and Rows

Delete columns you will not use in the analysis. Empty columns in the middle of a dataset confuse Excel's table detection and slow down operations.

Delete rows that are subtotals, headers repeated mid-table, or notes that were embedded in the data (a common problem with data exported from accounting software).

Check for and remove any completely blank rows with Ctrl+G β†’ Special β†’ Blanks β†’ select entire rows β†’ delete.

Step 11 Check for Outliers and Impossible Values

Use MIN and MAX to check the range of numeric columns:

=MIN(E2:E1000)   β†’ Minimum Amount
=MAX(E2:E1000)   β†’ Maximum Amount

In our sample, Amount = -500 is suspicious for a sales amount. Is a negative order valid (return/refund)? Or is it a data entry error? Flag these for review:

=IF(E2<0,"CHECK: Negative Amount","OK")

For dates, check that all order dates fall within the expected range. Dates in the future or before the business was founded are impossible values.

Step 12 Add Data Validation

Data validation prevents bad data from entering the sheet in the future. Select the Region column β†’ Data β†’ Data Validation β†’ Allow: List β†’ Source: North,South,East,West.

Now if someone types "NRTH" or "Nrth", Excel shows an error. The fix is upstream β€” at the point of entry β€” rather than in the cleaning step.

Add validation to: Status (dropdown: Completed, Pending, Cancelled), Region (dropdown), OrderDate (Date range: between 2020-01-01 and today), Amount (Whole number: greater than or equal to 0).

Step 13 Document Your Changes

Create a "Cleaning Log" sheet. Record: what you found, what you changed, how many rows were affected, and the date. This is professional practice β€” it makes your work auditable and reproducible.

Sample Cleaning Log Entry
  • 2026-09-29 β€” Removed 2 duplicate OrderIDs (1001 appeared twice). Row count: 5,000 β†’ 4,998.
  • 2026-09-29 β€” Applied TRIM+CLEAN to CustomerName and Region columns. 47 cells had leading/trailing spaces.
  • 2026-09-29 β€” Standardised Region: "NORTH" β†’ "North" (34 cells), "nrth" β†’ "North" (3 cells).
  • 2026-09-29 β€” Converted Amount column from text to number. 12 cells had leading apostrophes.
  • 2026-09-29 β€” Standardised 4 date formats to YYYY-MM-DD using DATEVALUE. 3 dates flagged as impossible (year 1900) β€” left for review.

Trainer's Practical Advice

From Sreemathy Sampath, Lead Trainer

The mistake most freshers make with data cleaning is trying to fix everything at once instead of working systematically. They see the messy data, feel overwhelmed, and start doing random fixes. Then they discover they have introduced new errors while fixing old ones. Follow the 13 steps in order. Each step assumes the previous steps are done. And always β€” always β€” check your work after each step, not just at the end. A PivotTable after each major step tells you immediately if the data looks right.

Common Mistakes

MistakeImpactPrevention
Not backing up before cleaningIrreversible data lossAlways make a raw data copy first β€” no exceptions
Removing duplicates without checking which rows are actually duplicateDeletes valid records that happen to share a keyReview duplicate candidates before deleting β€” some may be legitimate separate orders
Copying TRIM formula results over original without Paste Special β†’ ValuesColumn contains formulas referencing deleted helper column β€” broken referencesAlways Paste Special β†’ Values when replacing source data with cleaned values
Standardising categories but missing plural/singular variants (Region vs Regions)PivotTable still shows multiple groupsAfter standardising, create a PivotTable on the cleaned column to visually confirm only the expected unique values exist
Treating all blanks the same way (filling with "Unknown")Valid intentional blanks become misleading "Unknown" valuesCheck with the data owner whether blanks are missing data or intentionally empty before deciding how to handle them

Download a Messy Practice Dataset

Practice the 13 steps with a real messy dataset designed specifically for this guide β€” 1,000 rows of sales data with all the problems covered in this article.

Free download Β· No sign-up required Β· Excel .xlsx format
Download Practice Dataset
Key Takeaways
  • Always backup the raw data before starting. Data cleaning is irreversible.
  • Follow the 13 steps in order β€” each step assumes the previous steps are complete.
  • TRIM+CLEAN on every text column is the single most impactful two-function combination in data cleaning.
  • Numbers stored as text and dates stored as text are the most common causes of broken formulas and PivotTable errors.
  • For recurring reports, move the cleaning workflow to Power Query β€” record it once, run it every month with one click.
  • Document every change in a cleaning log. Auditable work is professional work.

Learn Data Cleaning with Live Instruction

Linkskill Academy's Data Analyst program includes a dedicated data cleaning module where you work through messy real-world datasets step by step with live trainer guidance. Join our next batch in Salem or online.

Live instructor-led Β· Online & Offline Β· Salem, Tamil Nadu Β· Batches available
Enquire on WhatsApp

Frequently Asked Questions

What is the first step in cleaning data in Excel?

The first step is always to make a backup copy of the raw data before touching anything. Save a copy to a different sheet or file. Data cleaning is destructive β€” once you delete duplicates or overwrite values, the original is gone. After backing up, run Remove Duplicates, then fix blank cells, then address data type issues.

How do I remove extra spaces from Excel cells?

Use the TRIM function: =TRIM(A2) removes all leading and trailing spaces and reduces multiple internal spaces to one. For non-printable characters (like those pasted from PDFs), use CLEAN first: =TRIM(CLEAN(A2)). After creating the cleaned column, copy it and Paste Special β†’ Values only to overwrite the original with the clean version.

How do I fix dates stored as text in Excel?

Dates stored as text show left-aligned in cells (numbers align right). To convert: (1) use DATEVALUE(A2) if the text is in a recognised date format, (2) use Data β†’ Text to Columns with Date format selected, or (3) use Find and Replace to fix the separator which forces Excel to re-evaluate the data type.

What does data validation do in Excel?

Data validation restricts what users can enter into a cell. You can limit entries to a list of allowed values (like a dropdown of regions), a number range, a date range, or a text length. It prevents bad data from entering the sheet in the first place. Go to Data β†’ Data Validation to set it up.

How do I find and fix blank cells in Excel?

Press Ctrl+G, click Special, choose Blanks and click OK. Excel selects all blank cells in the selection. Type a default value (like "Unknown") and press Ctrl+Enter to fill all selected blanks at once.

Should I clean data in Excel or Power Query?

For one-time cleaning of a static file, Excel formulas (TRIM, CLEAN, PROPER, VALUE, IFERROR) are fine. For recurring reports where new data arrives monthly, use Power Query β€” it records every cleaning step as a reusable recipe that runs automatically on refresh.

How do I standardise inconsistent category values?

Use Find and Replace (Ctrl+H) for simple fixes. For complex standardisation, create a mapping table (messy value β†’ correct value) and use XLOOKUP to replace all messy values at once. Add data validation with a dropdown list to prevent new variants from being entered.