Non standard characters

C

cate

User's are pasting text from Word. The results are non standard
character input. These have to be recognized. I can loop thru all
cells. What am I checking for. What is a "hit"?


AND

Is there a format setup that prohibits non standard characters?
 
R

Rick Rothstein

One person's "non-standard" character could be another person's "that is
just what I need" character. Can you describe what you consider non-standard
characters to be or, if it is easier for you, what a standard character is
to you? Since you are talking about text being pasted in, I guessing the
only way to filter these non-standard characters out (once you identify them
for us) is by using VB code.
 
R

ryguy7272

You have to know the code for those characters. Try something like this:
=code(A1)
Or, wherever those pesky characters are. When you have the correct code, or
number, place that number in this macro:

Sub Remove_CR_LF()
With Selection
..Replace What:=Chr(39), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
..Replace What:=Chr(146) & Chr(10), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
..Replace What:=Chr(180), Replacement:=Chr(32), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
End With
End Sub

For instance =code(!) = 33
 
C

cate

One person's "non-standard" character could be another person's "that is
just what I need" character. Can you describe what you consider non-standard
characters to be or, if it is easier for you, what a standard character is
to you? Since you are talking about text being pasted in, I guessing the
only way to filter these non-standard characters out (once you identify them
for us) is by using VB code.

Oops. I just want these:
ascii characters
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top