7 ways to clean up data in Microsoft Excel

Spelling errors, extra spaces, duplicates, formula errors, and blank cells can all cause trouble when parsing spreadsheet data.

Spelling errors, extra spaces, duplicates, formula errors, and blank cells can all cause trouble when parsing spreadsheet data. To clean up your Microsoft Excel spreadsheet, try one or more of the following ways to process the data.

1. Remove extra whitespace

Whether the word is entered or mistyped, you may have extra space in your data. This can include spaces at the beginning of cells, spaces at the end of cells, or miscellaneous spaces between words or values. While they may not seem important, you can easily run into problems filtering, sorting, or generating data.

There are two simple ways to remove extra spaces in your Excel worksheet: the TRIM function and the Find and Replace tool.

Using the TRIM . function

The TRIM function in Excel works especially well for removing spaces from your data. The formula's syntax is simply TRIM(text). Enter a cell reference or text for the argument.

Using the Find and Replace tool

If whitespace is scattered across the worksheet, you may want to use Excel's Find and Replace tool instead of the TRIM function. With this method you can remove all or some specific spaces.

1. Go to the 'Home' tab, open the 'Find & Select' drop-down menu in the Editing section and select 'Replace'.

7 ways to clean up data in Microsoft Excel Picture 17 ways to clean up data in Microsoft Excel Picture 1

 

2. In the Find and Replace box that appears, use the 'Find what' box to enter a space if you want to remove all or the exact number of spaces you want to remove.

7 ways to clean up data in Microsoft Excel Picture 27 ways to clean up data in Microsoft Excel Picture 2

3. In the 'Replace with' box , enter nothing if you want to remove all spaces or the exact number of spaces you want to keep.

7 ways to clean up data in Microsoft Excel Picture 37 ways to clean up data in Microsoft Excel Picture 3

4. Select 'Replace All' to remove extra spaces and you'll see your sheet update immediately.

7 ways to clean up data in Microsoft Excel Picture 47 ways to clean up data in Microsoft Excel Picture 4

 

2. Remove non-printable characters

Non-printable characters are similar to extra spaces. These are the first 32 characters, including zeros, in the 7-bit ASCII code for things like nulls, headers, form feeds, carriage returns, and unit separators. Like spaces, these characters can cause problems when calculating formulas, sorting, or filtering in your Excel worksheet.

Conveniently, you can use a simple function to remove non-printable characters in Excel. This function is called CLEAN and the syntax of the formula is CLEAN(text), where you can enter text or cell references for the argument.

This example has non-printable characters CHAR(10) at the beginning and end of the formula in cell A1.

7 ways to clean up data in Microsoft Excel Picture 57 ways to clean up data in Microsoft Excel Picture 5

Use this formula to remove them:

=CLEAN(A1)

7 ways to clean up data in Microsoft Excel Picture 67 ways to clean up data in Microsoft Excel Picture 6

You can also enter text as part of the CLEAN function. Use the following formula if you want to replace existing text with more compact text.

=CLEAN(CHAR(10)&"John Jacob Smith"&CHAR(10))

7 ways to clean up data in Microsoft Excel Picture 77 ways to clean up data in Microsoft Excel Picture 7

 

Non-printing characters are removed, leaving only text.

3. Delete empty rows

If you have blank rows in your worksheet, these can take up much-needed space for the actual data. You can remove blank rows in Excel with just a few steps and reclaim space in your worksheet.

Refer: How to add rows, delete rows in Excel for details on how to do it.

4. Find and remove duplicate data

Duplicate data is something that you might want to remove in your Excel worksheet. It could be a customer name, email address, phone number, or something like that.

There are several ways to find and remove duplicate data in Microsoft Excel and you can see the tutorial: How to remove duplicate data and content in Excel for different methods.

5. Delete Format

If more than one person is working on a worksheet or copying and pasting data from another location, the document can have more formatting that you don't need. This can include bold fonts, fills, or borders. Fortunately, you don't have to change every cell, row, or column. You can remove formatting in your worksheet with one click.

Note that if you set up conditional formatting in your worksheet, removing the formatting as explained here will also remove it.

1. Select the range of cells that contain the formatting you want to remove. The example applied bold, color, and italics to the text along with a fill and border color.

7 ways to clean up data in Microsoft Excel Picture 87 ways to clean up data in Microsoft Excel Picture 8

2. Go to the 'Home' tab, open the 'Clear' drop-down menu and select 'Clear Formats'.

7 ways to clean up data in Microsoft Excel Picture 97 ways to clean up data in Microsoft Excel Picture 9

3. You should see all formatting in those cells disappear.

7 ways to clean up data in Microsoft Excel Picture 107 ways to clean up data in Microsoft Excel Picture 10

6. Convert text to columns

 

When you get data from another source, it's not always presented the way you want it to. You may have rows with data that needs to be placed in separate cells within columns. You can convert this text into columns in just a few steps to make it easier to work with.

1. Select the cells you want to convert, go to the 'Data' tab and select 'Text to Columns' in the Data Tools group.

7 ways to clean up data in Microsoft Excel Picture 117 ways to clean up data in Microsoft Excel Picture 11

2. When the Convert Text to Column Wizard opens, take a few steps to convert your data based on its current state and how you want to display it. Start by selecting 'Delimited' or 'Fixed width'. Excel gives you suggestions based on your data, but you can choose whichever option works best. Click Next .

7 ways to clean up data in Microsoft Excel Picture 127 ways to clean up data in Microsoft Excel Picture 12

3. Depending on the option you choose in the first step, you will see the corresponding second step. For example, if you select Delimited data , you can select the separator, and if you select Fixed data , you can adjust the column width. Click Next.

7 ways to clean up data in Microsoft Excel Picture 137 ways to clean up data in Microsoft Excel Picture 13

4. Select a data format for the column, such as text or date, and enter a destination for the converted data. Click 'Finish'.

7 ways to clean up data in Microsoft Excel Picture 147 ways to clean up data in Microsoft Excel Picture 14

5. You'll see your text converted into columns, ready for you to work on.

7 ways to clean up data in Microsoft Excel Picture 157 ways to clean up data in Microsoft Excel Picture 15

 

7. Mark errors

Although Excel does a good job of pointing out errors in cells, such as errors in formulas, you may not notice these errors if you have a long workbook. With conditional formatting, you can highlight errors to make them easier to see and correct.

1. Select the entire sheet by clicking the 'Select All' button (triangle) at the top left of the sheet. If you only want to check certain cells, select those.

7 ways to clean up data in Microsoft Excel Picture 167 ways to clean up data in Microsoft Excel Picture 16

2. Go to the 'Home' tab, open the 'Conditional Formatting' drop-down menu in the Styles group and select 'New Rule'.

7 ways to clean up data in Microsoft Excel Picture 177 ways to clean up data in Microsoft Excel Picture 17

3. When the New Formatting Rule window opens, select 'Format only cells that contain' at the top and 'Errors' in the drop-down list at the bottom.

7 ways to clean up data in Microsoft Excel Picture 187 ways to clean up data in Microsoft Excel Picture 18

4. Click the 'Format' button to select the format you want to apply. You can do things like colorize cells, bold text, or add bold borders. Select 'OK' after you set the format.

7 ways to clean up data in Microsoft Excel Picture 197 ways to clean up data in Microsoft Excel Picture 19

5. You will see a preview of your selection at the bottom of the New Formatting Rule window . Click 'OK' to save and apply the rule.

7 ways to clean up data in Microsoft Excel Picture 207 ways to clean up data in Microsoft Excel Picture 20

6. When viewing the selected worksheet or cells, you will see the errors appear. After you correct the error, the formatting will disappear and you can move on to the next error.

7 ways to clean up data in Microsoft Excel Picture 217 ways to clean up data in Microsoft Excel Picture 21

5 ★ | 1 Vote