Sequential Numbers

SteelRail

New Member
Joined
Oct 29, 2002
Messages
30
I am trying to insert a macro or VB to keep track of numbering in a template. I have the following:

sub inc()
range("a1").value=range("a1").value+1
end sub

It works for numbering but I would like it to keep track of the last number assigned so when it runs again, it inserts the next sequential number. Any clue?
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Blacky

Board Regular
Joined
Jun 9, 2002
Messages
105
I don't know what you mean by "keep track", but you might consider a hidden sheet in your template that has a list of numbers used, or a list of numbers to be used.

HTH
 

SteelRail

New Member
Joined
Oct 29, 2002
Messages
30
Open Excel; Go to FILE-New and click the tab that says "spreadsheet solutions" and open INVOICE. A toolbar opens with the template and within the toolbar is a button that when pushed, displays a message and permenently assigns a number to the cell to the right of "po number".

How is this done? Anyone, please help!
 

royUK

Well-known Member
Joined
Jul 24, 2002
Messages
1,606
If you assign your macro to button you will have the same result.You need to save your invoice as a template. If your Invoice number is in A1 it will increase by 1 each time the button is clicked. The number will be remembered each time you save your invoice.
This message was edited by royUK on 2002-11-04 02:35
 

Watch MrExcel Video

Forum statistics

Threads
1,123,281
Messages
5,600,720
Members
414,401
Latest member
grenona2020

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top