Try this one
Sub Example1()
Set myrange = Range(Cells(2, "B"), Cells(Rows.Count, "B").End(xlUp))
For Each ccell In myrange
With ccell
.Value = Evaluate("trim(right(" & .Address & ",len(" & .Address & ")-find("" ""," & .Address & "))& "", "" & Left(" & .Address & ",find( "" ""," & .Address & ")-1))")
End With
Next
End Sub
I tried using the same method
Sub Example2()
With Range(Cells(2, "B"), Cells(Rows.Count, "B").End(xlUp))
.Value = Evaluate("trim(right(" & .Address & ",len(" & .Address & ")-find("" ""," & .Address & "))& "", "" & Left(" & .Address & ",find( "" ""," & .Address & ")-1))")
End With
End Sub
This method didn't work. For some reason all cells were duplicates of cell B2.
Bookmarks