Forum Discussion

Jane_Chameleon's avatar
Jane_Chameleon
Copper Contributor
Sep 10, 2020

How to create auto numbering invoice templates

I am struggling to create an excel template for a client. I need it to automatically generate a new invoice number each time my client opens the document. The numbers need to be sequential and I woul...
  • mtarler's avatar
    mtarler
    Nov 11, 2021

    JohnnyP51 That all said, I'm thinking of a very simple macro similar to the one posted in the original post above that could work and address my concerns with numbering. Basically on open increment the number in the template (similar to above) but only if it is the Blank Template, then a) save the template and then b) use Save AS to save the template as a new file based on the invoice number and make a small change so it knows it is no longer the template (i.e. now someone can open this document and review/modify/correct it as needed without generating new numbers). 

    Attached is a sample.  when you open it if you allow macros it will do as I noted above.  If you disable macros you can edit it and save/update the template.  If you trouble just use any created output file, make the changes you want, then type "TEMPLATE" into cell B2.  Note cell locations B2 and C3 as the invoice number are hard coded into the simple macro so if you want to move them you will have to tweak the macro itself.

Resources