Imported data has character that cannot be replaced

S

Ssolano

Imported a list into Excel
The column with notes has a character that represents
a "return"
It displays as a box
We tried a find and replace
It does not remove the character
How can we remove the return graphic in a cell?
 
B

Bernie Deitrick

S,

First find out what the character is. If it is in the 10th position in cell
A1, this formula will tell you what it is

=CODE(MID(A1,10,1))

Once you have done that, simply replace the (10) in the code below with that
number, and run the macro. Not sure what you want to replace it with, but
assumed a space.

Sub MyReplace()
Cells.Replace What:="" & Chr(10) & "", _
Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub

HTH,
Bernie
MS Excel MVP
 
D

David McRitchie

Top