Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I get an Excel spreadsheet to increase a number every time it is opened?

Posted on 2014-10-22
7
Medium Priority
?
76 Views
Last Modified: 2014-10-22
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?
0
Comment
Question by:100questions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 40396846
HI,

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
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40396857
There is a VBA routine on WorkbookOpen that can be utilised. How knowledgeable on VBA are you?
0
 

Author Comment

by:100questions
ID: 40396879
Thanks, not very good.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 40396903
See example

in the ThisWorkbook module (Alt+F11)

Regards
EE20141022.xlsm
0
 
LVL 27

Expert Comment

by:ProfessorJimJam
ID: 40396977
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 |?
0
 

Author Comment

by:100questions
ID: 40397928
@ProfessorjimJam - yes if the PO is 00001559 then the next time I open it, it needs to increase to 00001560.
0
 

Author Closing Comment

by:100questions
ID: 40397965
Works well, thank you.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question