New cohort starts 11 January 2027 · Limited seats · Apply now

Data Cleaning in Excel: 10 Techniques Every Analyst Needs

Nov 5, 2026 | Excel

Data cleaning in Excel is where most analysis really starts. Real data has extra spaces, duplicates, dates in three formats and numbers stored as text, and every one of these breaks lookups, pivots and charts. These ten techniques fix the problems you’ll meet most often.

A learner asking a question during a class

Before you start

Always keep the original data untouched. Copy it to a new sheet, or better, use Power Query, which never changes the source.

1. Remove extra spaces with TRIM

=TRIM(A2)

TRIM removes leading, trailing and double spaces, the most common reason a lookup returns #N/A. For non-breaking spaces copied from the web, use =TRIM(SUBSTITUTE(A2, CHAR(160), ” “)).

2. Fix capitalisation

=PROPER(A2)
=UPPER(A2)

PROPER turns “ikeja” into “Ikeja”; UPPER suits codes such as state abbreviations.

3. Remove duplicates

Data › Remove Duplicates, then choose the columns that define a duplicate. First count them with a pivot or COUNTIFS, so you know what you’re deleting.

4. Convert numbers stored as text

Green triangles in cells usually mean numbers stored as text. Select the column and use the warning menu’s Convert to Number, or:

=VALUE(TRIM(A2))

Remove currency symbols and commas first with SUBSTITUTE, for example “₦1,500” becomes 1500.

5. Fix dates (day-first vs month-first)

Nigeria writes dates day-first (03/04/2026 is 3 April). Files exported from US systems may be month-first. Check a few rows where the day is above 12. To convert text dates reliably, use Data › Text to Columns › Date: DMY, or in Power Query set the type with Using Locale › English (Nigeria).

6. Split columns

Data › Text to Columns splits “Lagos – Ikeja” into two columns. In Microsoft 365 you can also use:

=TEXTSPLIT(A2, " - ")

7. Standardise categories

Branch names like “Ikeja”, “IKEJA BRANCH” and “Ikeja Br.” break your totals. Create a small mapping table (raw value → clean value) and use XLOOKUP to standardise. See VLOOKUP vs XLOOKUP.

8. Standardise phone numbers

Nigerian numbers appear as 0803…, 803…, +234803… and 234 803 …. Strip spaces and symbols, then convert to one format such as +234XXXXXXXXXX. If you don’t actually need phone numbers for the analysis, delete the column instead: keeping less personal data is safer and in line with the Nigeria Data Protection Act.

9. Handle blanks

Decide case by case: leave blank, fill with zero (only if blank really means zero), fill from the row above (Go To Special › Blanks), or exclude the row. Write down what you decided.

10. Automate it with Power Query

Data › Get Data › From Table/Range opens Power Query. Every step you take (trim, change type, remove duplicates, replace values, split columns) is recorded and replayed when you click Refresh on next month’s file. Microsoft’s Power Query documentation covers every transformation.

A quick data cleaning checklist

Check How
Duplicates COUNTIFS or a pivot on the key column
Blanks Filter for blanks in every important column
Types Numbers right-aligned, dates as real dates
Categories Pivot of each text column to spot variants
Outliers Sort ascending and descending
Totals Compare with the source system

Next steps

Once your data is clean, summarise it with Excel pivot tables, or move the same steps into Python for data analysis for bigger files. Data cleaning in Excel and Power Query is covered in module 1 of Datamac’s data analytics courses.

FAQs

What is the fastest way of data cleaning in Excel?

For a one-off file, the built-in tools (TRIM, Remove Duplicates, Text to Columns). For anything you’ll repeat, Power Query.

Why does my VLOOKUP fail on data that looks the same?

Usually hidden spaces or numbers stored as text. TRIM and VALUE fix most cases.

Should I delete rows with missing values?

Only if it won’t bias your results. Often it’s better to keep the row and note the missing value.

Keep reading

Learn this live with Datamac

Datamac’s 12-month data analytics internship teaches Excel, SQL, Python, Power BI, Tableau and machine learning in live online classes twice a week, with real Nigerian datasets, two capstones and career support.

Apply for the internship · Compare courses · Ask a question on WhatsApp

Learn this live in the new cohort.

Live classes twice a week, real Nigerian datasets, two capstones and career support.

Apply for new CohortCompare courses

Keep reading