Adding one to the previous number in the column

  • Hi. I'm trying to create a macro, that will add plus one to the previous number in the column. Specificaly column A. The only macro I have been able to find is plus one to the selected cell. Sub P1() For Each cell In Selection cell.Value = cell.Value + 1 Next End Sub I have no idea where to start. I would apriciate if someone could help me.

  • Try yhis

    Sub AddOne()
        Dim r As Range
        For Each r In ActiveSheet.UsedRange.Columns(1)
            If IsNumeric(r) Then r = r + 1
    End Sub

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!