I know that using the clean
formula, I can clean up some of the non-ASCII characters (such as additional non-printable ASCII control characters #0 through to #31, #129, #141, #143, #144, and #157 except #127)
I also know that I can use the SUBSTITUTE(D1,CHAR(127),"")
to remove non-printable ASCII #127.
However, I cannot replace or identify non-ASCII characters inside a cell in Excel.
The following is a simple example:
Burrell's Model
Burrell’s Model
Notice that the first line is a normal ASCII string while the second line contains a non-ASCII character (the apostrophe).
May I know how to use Excel to find non-ASCII characters?
Thank you.
Update 1
According to Bandrami comments as follows:
In the broadest sense this is impossible; there are valid ASCII strings that are also valid UTF characters, so there's no way to ever know "for certain" (see the "Bush hid the facts" bug: en.wikipedia.org/wiki/Bush_hid_the_facts )
May I know how do I identify characters that is not in the following ASCII range?
- Less Than 128
- Not equal to 255
Best Answer
MS Office help seems to consider the apostrophe as a character that CLEAN should catch but it doesn't remove it on my machine.
MS Office help, Remove spaces and nonprinting characters from text, second to last paragraph
The 'simplest' I could find was a nested run of SUBSTITUTEs that clean anything that the CLEAN function doesn't catch.
From an old google excel group