E=mc2
asked on
How can I get an Excel spreadsheet to increase a number every time it is opened?
I have an Excel spreadsheet.
I would like a specific field, ie a PO number, to increase by 1 every time the Excel spreadsheet is opened.
The date is not a problem to show for today's date, however to increase the specific field is.
How can this be done?
I would like a specific field, ie a PO number, to increase by 1 every time the Excel spreadsheet is opened.
The date is not a problem to show for today's date, however to increase the specific field is.
How can this be done?
There is a VBA routine on WorkbookOpen that can be utilised. How knowledgeable on VBA are you?
ASKER
Thanks, not very good.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you mean like this?
if you PO number is in A2 then PO number is 00001559 and then next time you open it , it would be become 00001560
or you want another cell to be populated with 0001560 |?
if you PO number is in A2 then PO number is 00001559 and then next time you open it , it would be become 00001560
or you want another cell to be populated with 0001560 |?
ASKER
@ProfessorjimJam - yes if the PO is 00001559 then the next time I open it, it needs to increase to 00001560.
ASKER
Works well, thank you.
you could use an event macro (which is placed in the Workbook module(Alt+F11)
Private Sub Workbook_Open()
Range("A1") = Range("A1") +1
End Sub
Regards