Auto increment macro code

Thanks to experts exchange I now have a macro that adds a new row to the bottom of a worksheet.  What I now want the macro to do is to look at the value in a cell above (e.g Say cell A15 contains the value "20"), increment this by 1 and populate cell A16 in the new row with the value 21.
Hope this makes sense.
Who is Participating?
Rory ArchibaldCommented:
Assuming your row variable is lRow then:

Cells(lRow, "A").Value = Cells(lRow - 1, "A").Value + 1

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.