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

  • Thread starter Thread starter DJbase
  • Start date Start date
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top