# Excel CLEAN Function – Formula, Examples, How to Use?

The Excel’s CLEAN formula is like a magic cleaner that helps make the data in a computer look clean and new again. It removes any extra non printable characters that are not needed and makes the data easy to read.

Excel’s CLEAN function is a useful tool for removing non-printable characters from a cell or range of cells. This can be particularly helpful when working with imported data that may contain hidden characters or formatting errors.

Here is an example of how to use the CLEAN function in Excel using a table with 4 sample rows:

 A B C 1 Data Formula Output 2 New York =CLEAN(A2) New York 3 Mumbai =CLEAN(A3) Mumbai 4 New Delhi =CLEAN(A4) New Delhi 5 Gurgaon =CLEAN(A5) Gurgaon

The formula syntax for the CLEAN function is as follows:

CLEAN(text)

The text parameter is the cell or range of cells that you want to remove non-printable characters from. In the example above, the formula in cell B2 is =CLEAN(A2), which removes any non-printable characters from the data in cell A2. The formula in cell B3 is =CLEAN(A3) and so on.

As you can see in the output column (C) the output is same as input data in column A, which means the input data didn’t have any non-printable characters.

It’s worth noting that the CLEAN function only removes the first 32 non-printable characters in the ASCII code. This includes characters like line breaks, tab characters, and other non-printable characters. If you need to remove other types of characters, you’ll need to use a combination of other Excel functions, such as the SUBSTITUTE function.

This is a very simple example of how to use the CLEAN function, but it can be used in many different ways depending on your specific needs. Whether you’re working with imported data or simply want to clean up a messy spreadsheet, the CLEAN function is a valuable tool to have in your Excel toolbox.

Use cases of CLEAN formula in Excel:

1. Removing special characters: The CLEAN function can also be used to remove special characters from a cell or range of cells. This can be helpful when working with data that may contain hidden characters or formatting errors. By using the CLEAN function, you can ensure that all of your data is clean and consistent.
2. Removing line breaks: The CLEAN function can be used to remove line breaks from a cell or range of cells. This can be particularly useful when working with data that contains multiple lines in a single cell. By using the CLEAN function, you can ensure that all of your data is clean and consistent. This is useful when you are trying to combine cells with multiple lines in it.

Top mistakes users make while using CLEAN formula in Excel:

1. Not reviewing the data before and after applying the formula: Many users apply the CLEAN formula without reviewing the data before and after applying the formula. This can cause them to miss some errors or issues with the data. It is important to review the data both before and after applying the formula to ensure that it is working as intended.
2. Not understanding the limitation of the function: The CLEAN function only removes the first 32 non-printable characters in the ASCII code. This includes characters like line breaks, tab characters, and other non-printable characters. Users may not be aware of the limitation of the function and expect it to remove other types of characters. Understanding the limitation of the function is important to make the best use of it.
3. Not using the function with other formulas: The CLEAN function is a great tool, but it’s not always enough to clean all the data. Users may make a mistake by only using the CLEAN function, and not using it in combination with other formulas to clean the data more effectively. For example, you can use the SUBSTITUTE function to remove specific characters, and then use the CLEAN function to remove any remaining non-printable characters.

Mention the alternative(s) to CLEAN formula in Excel:

1. TRIM function: The TRIM function is an alternative to the CLEAN function that can be used to remove extra spaces from a cell or range of cells. It works by removing all leading and trailing spaces from a text string, as well as any double spaces within the text.
2. SUBSTITUTE function: The SUBSTITUTE function can be used to replace specific characters or text within a cell or range of cells. This can be useful for removing specific characters or symbols that are causing formatting errors or issues.
3. SUBSTITUTE and TRIM function in combination : One can use both of these functions together in a formula. This can be useful for when you want to remove specific characters and then remove extra spaces.
4. Regular Expression (Regex) : Regular expressions (Regex) is a powerful tool that can be used to match and replace text patterns. it’s a more advanced alternative and requires knowledge of the language, but it can be useful for more complex data cleaning tasks that cannot be done with the CLEAN, TRIM, and SUBSTITUTE functions alone.
5. Text to Columns: Text to Columns is a feature in Excel that allows you to split cells containing multiple pieces of data into separate columns. This can be useful when working with data that contains multiple values in a single cell and you want to separate them into different columns.

Share: