Hello all,

lets consider this:


'looping from first row (1) to the last used row (10)
For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row

    for j = 1 to 20
        'inserts 10 rows bellow where I am currently am (row i)
        i = i + 1
        ThisWorkbook.Worksheets("Report").Rows(i).Insert
        'do whatever i need here, so basicaly at this point the last used row from criteria now changed from 10 to 11, any by next loop (j) even more increased
    next j

next i
so at the poinf of first loop (i) the program stops
so it does not update the for loop (for i) criteria properly, or as i desire.

what would be the solution