How to Use the CLEAN Function in Excel

Today, we’ll explore the CLEAN function in Excel and Google Sheets, an essential tool for tidying up text by eliminating non-printable characters that can disrupt your data.

How CLEAN Works

The CLEAN function is designed to take a single argument: the text from which you need to remove non-printable characters. It processes this input by stripping out these characters, returning a cleaner version of the text.

Example

Consider the following scenario where you have text in cell A1:

Original Text Hey! This is a test with some non-printable characters:àĈţ

By applying the CLEAN function like so: =CLEAN(A1)

The result would be a text free from non-printable characters: “Hey! This is a test with some non-printable characters:”

Common Uses

The CLEAN function proves incredibly useful when dealing with text imported from external sources, which often contains non-printable characters. It ensures the text is clean and suitable for further analysis or reporting.

Implementation

To effectively use the CLEAN function in Excel and Google Sheets, follow these steps:

Excel

  1. Type the text you wish to clean in a cell.
  2. In another cell, input the formula =CLEAN(cell), replacing “cell” with the reference to the cell containing your text.
  3. Press Enter to display the text devoid of non-printable characters.

Google Sheets

  1. Replicate the steps used in Excel to enter your text and apply the CLEAN formula.
  2. The result will update automatically as you alter the original text.

By mastering the CLEAN function, you enhance your ability to prepare and clean text data in both Excel and Google Sheets, making it an invaluable resource for your data processing tasks.

More information: https://support.microsoft.com/en-us/office/clean-function-26f3d7c5-475f-4a9c-90e5-4b8ba987ba41

Other functions
Returns an array of text values from any specified range
Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters
Converts a number to text, using the ß (baht) currency format
Returns the character specified by the code number
Returns a numeric code for the first character in a text string
Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments
Joins several text items into one text item
Changes half-width (single-byte) English letters or katakana within a character string to full-width (double-byte) characters
Converts a number to text, using the $ (dollar) currency format
Checks to see if two text values are identical
Finds one text value within another (case-sensitive)
Formats a number as text with a fixed number of decimals
Changes half-width (single-byte) characters within a string to full-width (double-byte) characters
Returns the leftmost characters from a text value
Returns the number of characters in a text string
Converts text to lowercase
Returns a specific number of characters from a text string starting at the position you specify
Converts text to number in a locale-independent manner
Extracts the phonetic (furigana) characters from a text string
Capitalizes the first letter in each word of a text value
Replaces characters within text
Repeats text a given number of times
Returns the rightmost characters from a text value
Finds one text value within another (not case-sensitive)
Substitutes new text for old text in a text string
Converts its arguments to text
Formats a number and converts it to text
Combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined If the delimiter is an empty text string, this function will effectively concatenate the ranges
Removes spaces from text
Returns the Unicode character that is references by the given numeric value
Returns the number (code point) that corresponds to the first character of the text
Converts text to uppercase
Converts a text argument to a number
Returns text from any specified value