Hello,
I have code in excel to remove non-breaking space (CHAR(160).
Then I would like to apply this as the VBA script for the selection range and found some error.
Can anyone please point out what went wrong in my code?
I have code in excel to remove non-breaking space (CHAR(160).
Then I would like to apply this as the VBA script for the selection range and found some error.
Can anyone please point out what went wrong in my code?
VBA Code:
Sub Macro1()
'
Dim Cel As Range, rng As Range
Set rng = Selection.SpecialCells(xlCellTypeVisible)
With Application
.ScreenUpdating = False
For Each Cel In rng
Cel.Value = Substitute(Trim(Cel), CHAR(160), """")
Next
End With
End Sub