Hello All
I have the following code that works well but the problem is the range in
line
i =2 to 5 is fixed
but this range is dynamic with a filter formula so I need to make it dynamic


Sub loop()

Dim rng As Range
Set rng = Sheets("sht2").Range("A15")
For i = 2 To 5
rng = Sheets("sht2").Range("O" & i)
Call Action1
Next i
  
End Sub

I tried to use the following line but it did not work

For i = Cells(Rows.Count, 15).End(xlUp).Row