the complete code as the following
![]()
Sub loop() Dim ws As Worksheet Set ws = ActiveSheet Dim rng As Range Set rng = Sheets("sht2").Range("A15") Dim lastRow As Long lastRow = ws.Cells(ws.Rows.Count, 15).End(xlUp).Row For i = 2 To lastRow rng = Sheets("sht2").Range("O" & i) Call action1 Next i End Sub
Bookmarks