Automatically increasing a number by 1

D

Dave

How can I get a number in a cell to automatically in crease by 1 when the
workbook is opened?

THanks
 
G

Gord Dibben

Dave

Private Sub Workbook_Open()
With Sheets("Sheet1").Range("A1")
..Value = .Value + 1
End With
End Sub

Adjust sheet and range to suit.

Right-click on the Excel Icon left of "File" on the menubar.

Select "View Code".

Paste the above into that module.


Gord Dibben MS Excel MVP
 
Top