S
StackemEvs
Hi,
I am looking at how to remove extra spaces, and have been thinkin
about using Autocorrect.
I have been reading another thread which suggested;
For Each cell In Selection
cell.Value = WorksheetFunction.Trim(cell.Text)
Next
What I have been using is;
With Application.AutoCorrect
.AddReplacement "Want", "Replace"
End With
Works well within a loop changing any "Replace" text with "Want".
Something I didn't get Substitute to do correctly within a loop.
What I can't get AutoCorrect to do though is work with spaces, so:
With Application.AutoCorrect
.AddReplacement "", " "
End With
Would you expect it to do so?
Thanks in advance for any suggestions
Nei
I am looking at how to remove extra spaces, and have been thinkin
about using Autocorrect.
I have been reading another thread which suggested;
For Each cell In Selection
cell.Value = WorksheetFunction.Trim(cell.Text)
Next
What I have been using is;
With Application.AutoCorrect
.AddReplacement "Want", "Replace"
End With
Works well within a loop changing any "Replace" text with "Want".
Something I didn't get Substitute to do correctly within a loop.
What I can't get AutoCorrect to do though is work with spaces, so:
With Application.AutoCorrect
.AddReplacement "", " "
End With
Would you expect it to do so?
Thanks in advance for any suggestions
Nei