Solved

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

Posted on 2014-10-22
7
66 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
7 Comments
 
LVL 48

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 31

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 48

Accepted Solution

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

in the ThisWorkbook module (Alt+F11)

Regards
EE20141022.xlsm
0
 
LVL 25

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now