Solved

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

Posted on 2014-10-22
7
72 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 51

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Accepted Solution

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

in the ThisWorkbook module (Alt+F11)

Regards
EE20141022.xlsm
0
 
LVL 26

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

734 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