How to Do Automated Data Cleaning in Excel (10 Easy Tips)

We have a disorganized dataset containing Name, Date of Birth, Profession, and Salary of some people.

Ways for Automated Data Cleaning in Excel


Method 1 – Use the Power Query Feature to Clean Data in Excel

Steps:

  • Select the cell range B4:D10.
  • Go to the Data tab and click on From Table/Range.

Use of Power Query Feature to Clean Data in Excel

  • The Create Table box will open, and the dataset has already been selected.
  • Press OK.

Opening Create Table Box for Automated Data Cleaning

  • The Power Query Editor will appear.
  • Click on Use First Row as Headers to set the header.

  • To change the text case, select the Name column.
  • Go to the Transform tab and click on Text Column, click on Format, then select Capitalize Each Word.

  • Click on the button below to remove rows with empty cells.
  • Click on Remove Empty.

  • Click on Close & Load and select Close & Load To.

  • The Import Data box will open.
  • Select the New worksheet option.
  • Click on OK.

Opening Import Data Box for Automated Data Cleaning in Excel

  • Here’s the result in a new sheet.


Method 2 – Applying Text to Columns in Excel

We have both the first and last name of a person in the same column titled as Name. We can separate the data into two different columns.

Steps:

  • Select the cell range B5:B10.
  • Go to the Data tab, click on Data Tools, and select Text to Columns.

Applying Text to Columns Feature for Automated Data Cleaning in Excel

  • Click on Next.

  • Select Semicolon, Comma, Space and @ in Others as Delimiters.
  • Click on Next.

  • Insert Cell C5 as Destination.
  • Click on Finish.

  • The data has been divided into two columns First Name and Last Name.

Read More: How to Remove Partial Data from Multiple Cells in Excel


Method 3 – Use the Flash Fill Feature for Automated Data Cleaning in Excel

We have different unwanted symbols in the dataset.

Steps:

  • Insert Jack in the First Name column. This is the first value from the cell before it.
  • Go to the Data tab, click on Data Tools, then click on Flash Fill.

Use of Flash Fill Feature for Automated Data Cleaning in Excel

  • All the other symbols have been removed.


Method 4 – Use of the SUBSTITUTE Function for Data Cleaning in Excel

We can remove unwanted symbols for automated data cleaning in Excel using the SUBSTITUTE function.

Steps:

  • Select Cell D5.
  • Insert the following formula.
=SUBSTITUTE(C5,"@", )

Use of SUBSTITUTE Function for Automated Data Cleaning in Excel

In the SUBSTITUTE function, we inserted Cell C5 as text, “@” as old_text and blank (“ “) as new_text.

  • Press Enter and drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.

  • The SUBSTITUTE function has removed the unwanted symbols from column D.

Automated Data Cleaning in Excel Using SUBSTITUTE Function


Method 5 – Applying Find & Replace in Excel

We can see two values containing “#” and two values containing “@” and “;”. We will replace this value with blank.

Steps:

  • Select the cell range B5:D10.
  • Go to the Home tab, click on Editing, click on Find & Select, then select Replace.

Applying Find & Replace Feature for Automated Data Cleaning in Excel

  • The Find and Replace toolbox will open.
  • Insert “#” in the Find what box and blank in the Replace with box.
  • Click on Replace.

Opening Find and Replace Box for Automated Data Cleaning in Excel

  • The “#” signs have been removed.

  • Similarly, you can remove “@” and “;” from the dataset using the Find & Replace Feature.


Method 6 – Using the Cell Format for Automated Data Cleaning in Excel

Some of the values of the Date of Birth are not in the Date format.

Steps:

  • Select the cell range C5:C10.
  • Go to the Home tab and click on Number (or go to the group), then click on the drop-down button.

Using Number Format for Automated Data Cleaning in Excel

  • Select Short Date.

  • Apply different formatting based on what you need.


Method 7 – Using Remove Duplicates for Data Cleaning

We will remove the duplicate values.

Steps:

  • Select the cell range B4:D11.
  • Go to the Data tab, click on Data Tools, and select Remove Duplicates.

Using Remove Duplicates Option for Automated Data Cleaning in Excel

  • The Remove Duplicates dialog box will open.
  • Press OK.

Opening Remove Duplicates Dialog Box for Automated Data Cleaning in Excel

  • Another box containing the information of the duplicates will appear.
  • Press OK.

  • The Remove Duplicates feature will remove the duplicate values from the dataset.


Method 8 – Applying the Go To Special Feature for Automated Data Cleaning

We will use the Go to Special feature to detect blank cell.

Steps:

  • Select the cell range B4:D11.
  • Go to the Home tab, click on Editing, click on Find & Select, then select Go To Special.

Applying Go To Special Feature for Automated Data Cleaning in Excel

  • The Go To Special box will appear.
  • Select Blanks.
  • Click on OK.

Opening Go To Special Box for Automated Data Cleaning in Excel

  • The blank cells have been selected.

  • You can change the format of the selected cells. Go to the Home tab, click on Fill Color, and select Red as Fill Color.

  • Here’s the result.


Method 9 – Matching Text in a List for Data Cleaning in Excel

We are going to find out the persons who have resigned from the left side of our example. There is a list on the right side of the resigned numbers.

Steps:

  • Select cell D5.
  • Insert the following formula.
=IF(COUNTIF($F$5:$F$11,C5),"Resigned","")

Matching Text in List for Automated Data Cleaning in Excel

The COUNTIF function of the formula will return 1 if it (bold part) matches a list value(Cell range F5:F11) with a data value (Cell C5). If this part returns 1 or more, then the IF function will return “Resigned”, otherwise nothing.

  • Press Enter and drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.

This whole formula will display the word “Resigned” if the “Member Num” in column C is found in the “Resigned Members” list. If the Member number is not found, it returns an empty string.

  • You will get the word “Resigned” if the “Member Num” in column C is found in the “Resigned Members” list. If the Member number is not found, it returns an empty string.

You can sort the list by column D, the rows for all Resigned Members will appear together and can be quickly deleted.

  • To sort by column D, select Cell D5 to D22.
  • Choose Home, then go to Editing, click Sort & Filter, and select Sort Z to A.

  • The Sort Warning box will open.
  • Select Expand the selection.
  • Click on Sort.

Opening Sort Warning Box for Automated Data Cleaning in Excel

  • Here’s the result.


Method 10 – Using Spell Check for Cleaning in Excel

Steps:

  • Select the cell range C5:C10.
  • Go to the Review tab and click on Spelling.

Using Spell Check for Automated Data Cleaning in Excel

  • The Spelling box will open.
  • Select Manager.
  • Click on Change.

Opening Spelling Box for Automated Data Cleaning in Excel

  • Select Receptionist.
  • Click on Change.

  • Select Clerk.
  • Select Change.

  • A Microsoft Excel warning box will appear.
  • Click on OK.

  • Here’s our sample result.


Practice Section

In the article, you will find an Excel workbook like the image below to practice independently.

Practice Section


Download the Practice Workbook


Related Articles:

<< Go Back To Data Cleaning in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Kawser Ahmed
Kawser Ahmed

Kawser Ahmed is a Microsoft Excel Expert, Udemy Course Instructor, Data Analyst, Finance professional, and Chief Editor of ExcelDemy. He is the founder and CEO of SOFTEKO (a software and content marketing company). He has a B.Sc in Electrical and Electronics Engineering. As a Udemy instructor, he offers 8 acclaimed Excel courses, one selected for Udemy Business. A devoted MS Excel enthusiast, Kawser has contributed over 200 articles and reviewed thousands more. His expertise extends to Data Analysis,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo