Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting rid of char(160)
Hi Folks!
I recorded a macro to clean the range selected of char(160)'s and attached it to a button on one of my toolbars. It's not working. Here's the code from the macro recorder: Sub Clean160() Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False End Sub The actual recorded code included as the first line: Range("A1:A10").Select I figured since that referenced a specific range I could just remove that line and since the next line starts with Selection, that referred to any range selected. Is that the problem? Also, how does the code: Selection.Replace What:=" ", know that " " is char(160) and not char(32)? I tried replacing =" " with =char(160) but that errored. Thanks! Biff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIND 1 char in cell of any 3 char =True | Excel Discussion (Misc queries) | |||
8500 cells with phone number(7 char.), wishing to add area code (10 char.) | Excel Discussion (Misc queries) | |||
About NUM to CHAR | Excel Programming | |||
Get rid of CHAR(12) | Excel Programming | |||
How to removed the first three char and last char in XLS | Excel Programming |