[Solved] Cell Value Increment and Offset


Try using Public Variable like this:

Public n As Long '~~> Declare a public variable at the top of the module

Then in your sub try something like this:

With Sheets("Sheet1").Range("A6").Offset(n, 0) '~~> change to suit
    If n = 0 Then
        .Value =  1
    Else
        .Value =  .Parent.Range(.Address).Offset(-1, 0) + 1
    End If
    n = n + 1
End With

5

solved Cell Value Increment and Offset