Im trying to use For loop on an excel column. This is my code:
For Each c In Worksheets(\"sheet1\").Range(\"A1:A5000\").Cells c.Offset(0, 1).Range
You may try this ...
Dim r As Range Set r = Range("A65536").End(xlup) For Each c In Worksheets("sheet1").Range("A1:" & r.Address).Cells c.Offset(0, 1).Range("A1").Value = Right((Left(c, 13)), 7) Next