Excel VBA code-sequential numbering

Jegacats

Board Regular
Joined
Jul 30, 2002
Messages
136
Would someone please tell me a code I can use for sequential numbering ?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I can't believe no one has a solution.
I know I'm not very clear on what I am looking for. I will try to give a more concrete example.

I have a template (My expense report)When I open it, I would like it to have the current expense report number.
Ex : If the last number I used was 10, I would like the next one I make to be 11.

Thanks for any suggestions.
 
Upvote 0
Thank you. This works fine.
I opened the template, copied the code,saved the template. I tested the template.
I did "file" new and there it was, the number changed . I filled out the form and saved it with a new name and as an .xls

The next time I did file new, the number did not change.. :(
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,565
Members
449,038
Latest member
Guest1337

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
Back
Top