Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

Excel CLEAN function

The Microsoft Excel CLEAN function is used to remove all non-printable characters from the given text.


Syntax

=CLEAN (text)


Arguments

Text (Required): The text you will remove non-printable characters from.


Return Value

Return text with non-printable characters removed.


Function Note

The CLEAN function removes the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31) from the given text. In the Unicode character set, there are additional nonprinting characters (values 127, 129, 141, 143, 144, and 157). For these additional non-printable characters, the CLEAN function does not remove by itself.


Examples

This section explains how to use the CLEAN function with detailed examples.

Example 1: Remove non-printable characters and line breaks from given texts

For removing non-printable characters along with the line breaks from the given texts, please do as follows.

1. Select a blank cell to output the text with non-printable characters removed.

2. Copy the below formula into it and press the Enter key.
=CLEAN(B3)

3. Then drag the Fill Handle down to apply the formula to other cells to get all texts without non-printable characters.

Example 2: Remove non-printable characters, line breaks and extra spaces from given texts

For removing non-printable characters, line breaks and extra spaces at the same time, you can do as follows.

1. Select a blank cell, copy the below formula into it and press the Enter key.
=TRIM( CLEAN( C3 ))

Then drag the Fill Handle down to get other texts without non-printable characters and extra spaces as below screenshot shown.

Example 3: Check if a cell contains non-printable characters

Sometimes, non-printable characters are hidden in cells, if you want to identify if a cell contains non-printable characters in order to clean them, the formula in this section can do you a favor.

1. Select a blank cell which is adjacent to the cell you will check for non-printable characters, copy the below formula into it and press the Enter key.
=IF(CLEAN(B3)=B3,"None","Needs Cleaning")

2. The drag the Fill Handle down to get all results.

Note: If non-printable characters existing in the specific cell, it returns the result as “Needs Cleaning”, otherwise, it returns “None”.


More articles of Cleaning specific characters:

Remove non-alphanumeric characters in Excel
Supposing there is a range of data, such as JAMES0898#4%^{}, which contains non-alphanumeric characters in a worksheet, and now you just only want to remove the non-alphanumeric characters and keep the alphanumeric characters. For example, JAMES0898#4%^{} > JAMES0898. This article has the method for you.
Click to know more...

Remove alpha characters from cells in Excel
Supposing you need to remove all alpha characters from a range in Excel, for example one data in a cell may be “lucase 13654698745”, and you want it to be “13654698745”, how can you quickly remove all alpha characters from cells? Are there any good ideas to deal with this problem? Try the methods in this article.
Click to know more...

Remove non numeric characters from cells in Excel
Supposing you have a worksheet with lots of such data ABCD4578124YUIOH, and you only want to remove the non-numeric characters ABCDYUIOH but keep the numeric characters in cells. Try the method in this article.
Click to know more...

Remove non-alpha characters from cells in Excel
For example, you have a range data such as Jacob "001" @#$%, and you want to remove all the non-alpha characters from the string to keep it as Jacob. In Excel, how can you remove all non-alpha characters from cells quickly? This article shows two methods to help you get it done easily.
Click to know more...

Quickly remove line breaks in Excel
Sometimes, when you copy some data from the website or you separate your values with Alt + Enter keys, you will get some line breaks or carriage returns, if you want to quickly remove multiple line breaks in Excel, you can quickly get it done with methods in this article.
Click to know more...


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Screen Shot of Excel (with Office Tab installed)

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.