Skip to main content

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...


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations