

In this case, all non-printing characters in cell B14 are replaced with a space. You use this function in the following manner within your worksheet: SText = Replace(sText, vAddText(J), sSubText) Consider the following example macro:įunction ReplaceClean1(sText As String, Optional sSubText As String = " ") It isn't too difficult to create your own version of the CLEAN worksheet function that, instead of simply removing non-printing characters, replaces them with spaces. You can, of course, use a macro to get rid of the offending characters. Some people report that they get exactly the results they want by using this round-trip approach to working with the data. You can then paste the data back into Excel. Copy the data from Excel to a Word document (paste it as regular text), and then replace the offending characters. One thing to try is to use Word in your "clean up" operations. If it doesn't work, then you should try a different approach.

If it does work, then you have learned a valuable technique for getting rid of the bad characters. This approach may or may not work, depending mostly on Excel and whether it let you accurately copy the offending character in step 1. If you want to replace the characters with spaces, put a single space in the Replace With box.

Excel displays the Replace tab of the Find and Replace dialog box.
#LIST NONPRINTING CHARACTERS MS WORD FOR MAC HOW TO#
If you work with files that originate from a non-Excel source, you can sometimes end up with characters in your cells that Excel doesn't know how to display properly.
