ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to increment invoice number (https://www.excelbanter.com/excel-programming/277567-macro-increment-invoice-number.html)

Paul

Macro to increment invoice number
 
Hi all,

I have a template that I use for invoices and would like to know how I can
get the invoice number to increment by one everytime I create a new invoice,
I know I have to enter the code into an autoexec macro but what would the
code be to check the last invoice used and then increment this one by 1.

Thanks in advance for any assistance

Paul



steve

Macro to increment invoice number
 
Paul,

With the number in A1

Cells(1, 1) = Cells(1, 1) + 1

where the 1st 1 is the row number of the Invoice Number cell, and the
2nd 1 is the column number.

--
sb
"Paul" wrote in message
...
Hi all,

I have a template that I use for invoices and would like to know how I can
get the invoice number to increment by one everytime I create a new

invoice,
I know I have to enter the code into an autoexec macro but what would the
code be to check the last invoice used and then increment this one by 1.

Thanks in advance for any assistance

Paul






All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com