Excel includes an interesting worksheet function whose duty it is to make sure that your text is “clean.” By this, Excel means that your text contains only printable characters. Thus, the function removes certain non-printable characters and control codes from your text. The syntax is rather simple, as follows:
All you need to do is include the text, or a reference to a cell that contains text. In doing some testing, it appears that the function removes anything with an ANSI value of 1 through 31, as well as the values 129, 141, 143, 144, and 157.
So why would you use the CLEAN function? If you import information from some mainframe or on-line services, the non-printable codes could be interspersed in the information you receive. This can cause problems printing or viewing the information correctly. CLEAN can help rectify those problems.