Hi,
I have a code to remove spaces but as there are up to 4 spaces before text, I want to loop the code but not sure how to do it.

I tried
Sub spacer()

For Each r In ActiveSheet.UsedRange
Do While Left(r.Value, 1) = " "
If Left(r.Value, 1) = " " Then r.Value = Right(r.Value, Len(r.Value) - 1)
Next r
Loop

End Sub

Thanks