how do i have a cell number increase by 1 each time file opened

D

DJbase

i would like to know how to formulat a cell so each time the number in the
cell will increase by 1 or 5. there will be 5 people who access this file
only one at a time.
 
G

Gord Dibben

Cannot be done through formatting.

Need code to run when opening the workbook.

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

Right-click on the Excel Icon left of "File" and select "View Code".

Copy/paaste the above into that module.

Alt + q to return to the Excel window.

Make sure there is a number in the cell.

Save, close and re-open to see the number increase by 1


Gord Dibben MS Excel MVP
 
Top