Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Substitute() & Char() in Macro
I am trying to write a macro to remove white space in my excel spreadsheet. I
have following script but it says my sub or function not defined, but if I use it in excel (not macro) it actually works. Any idea? Thanks. Sub WhiteSpaceRemover() Application.ScreenUpdating = False For Each cell In Selection cell.Value = Trim(Substitute(cell.Value, CHAR(160), CHAR(32))) Next cell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( | Excel Discussion (Misc queries) | |||
FIND 1 char in cell of any 3 char =True | Excel Discussion (Misc queries) | |||
How to use substitute function in macro? | Excel Programming | |||
How to substitute a comma with a newline char using Replace. | Excel Discussion (Misc queries) | |||
8500 cells with phone number(7 char.), wishing to add area code (10 char.) | Excel Discussion (Misc queries) |