I want to remove the extra spaces after the text "Denver Health " into "Denver Health" for the range in column A. input:
Column A
"Denver Health Hospital "
"Pueblo Hospital "
output:
Column A
"Denver Health Hospital"
"Pueblo Hospital"
I have tried that code but it removes all the spaces
Sub SpaceKiller()
Worksheets("Sheet2").Columns("A").Replace _
what:=" ", _
Replacement:="", _
SearchOrder:=xlByColumns, _
MatchCase:=True
End Sub
Another attempt was
Sub trim()
Dim r As String
r = RTrim(Range("A2:A"))
End Sub