Clean up your data with this easy-to-use Excel function

Here's a truly efficient way to get rid of garbage characters that have tagged along with imported data: Just let the Excel CLEAN function remove them for you.

Excel includes a number of functions that allow you to remove printable characters, like spaces, from imported data. But what if your data contains nonprintable characters, like the ones shown in Figure A?

Figure A

To clean up this data, Excel provides the CLEAN function. Follow these steps:

  1. Select C2:C10.
  2. Enter the following formula: =CLEAN(A2)
  3. Press Ctrl + Enter (Figure B).

Figure B

Excel displays the contents of the cells without the nonprintable characters. You can now copy the results to another part of the workbook using the Paste Special option to copy the values without the formulas (Figure C).

Figure C

Miss an Excel tip?

Check out the Microsoft Excel archive and catch up on other Excel tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

Editor's Picks