When I download a file there is a space at the beginning of the text.
I am using the code below to remove the blank space.
The length of the text will always be 5 characters.
How can I protectect against the macro being run a second time and removing an additional character?
Sub RemoveSpaceAtFront()
Dim cell As Range
For Each cell In Range("a5:a36")
If Not IsEmpty(cell) Then cell.Value = Right(cell, Len(cell) - 1)
Next cell
End Sub
Thanks,
John
I am using the code below to remove the blank space.
The length of the text will always be 5 characters.
How can I protectect against the macro being run a second time and removing an additional character?
Sub RemoveSpaceAtFront()
Dim cell As Range
For Each cell In Range("a5:a36")
If Not IsEmpty(cell) Then cell.Value = Right(cell, Len(cell) - 1)
Next cell
End Sub
Thanks,
John