I did the following for loop to go down each cell until it reaches the cell that is level with the last used cell in another column. However it goes well beyond the last used cell. It works okay, but just takes a lot longer to run especially when it has 30,000 rows to go through! Does anyone have any ideas on this one?
Dim i As Long
lMaxRows = Cells(Rows.Count, "K").End(xlUp).Row
For i = 1 To lMaxRows
Range("D" & lMaxRows + 1).Select
ActiveCell.FormulaR1C1 = "0:00:00"
lMaxRows = Cells(Rows.Count, "E").End(xlUp).Row
Range("E" & lMaxRows + 1).Select
ActiveCell.FormulaR1C1 = "1"
Next i