How to Make Invoice Number Change Automatically in Excel?

Out of the many ways to create an invoice, using Excel is definitely a good option. You can adapt it to your business’ specific needs and send a professional-looking document to your clients. But to keep a steady rhythm and avoid wasting time, there are things you can do to speed up the process.

One of these things is using an invoice number generator to assign a new and unique number to each invoice. To make things easier for you, especially if it’s your first time issuing bills this way, we will show you how to number invoices with an invoice generator in Excel.

How to Make Invoice Number Change Automatically in Excel?

If you want to auto-generate the invoice number in Excel, you need to follow a few specific steps. Basically, you will need to add a macro to the Excel document. This may sound complicated, but with our instructions, you will do it in no time.

First, what’s a macro? It’s what you need to use to make Excel perform a specific action repeatedly. For example, once you learn how to make an invoice number, you also need to make sure the number automatically changes with each new invoice.

So, you use a macro to auto-generate a number in Excel. The macro contains the instructions the Excel cell needs to follow to renew the invoice number. Here is how to create an invoice number generator in Excel:

  • Use Excel to create your invoice, with one of the free available templates. Once you built the invoice, create the first invoice number and put it in an individual cell without adding any more information.
  • Note the cell that contains your invoice number; this information is crucial for the macro.
  • Hold down ALT and F11 at the same time to get to the “Microsoft Visual Basic for Applications" screen.
  • Look for ‘This Workbook’ and double click it (it’s under Microsoft Excel Objects).
  • You need to use the following code once you include the cell number you noted before:

Private Sub Workbook_Open()

Range(“C2”).Value = Range(“C2”).Value + 1

End Sub

Copy the code and paste it into the blank window to the right of the “Microsoft

Visual Basic for Applications" screen.

  • It’s time to modify your macro settings. To do that, find ‘Developer’ on your toolbar, then ‘Macro Security,’ and click on “Enable all macros" and “Trust access to the VBA project object model."
  • The next step is to save the document in its Macro-Enabled form. First, type the name you gave your invoice and save it as “Excel Macro-Enabled Template.”
  • Restart your device. Once your computer restarts, click on the Excel invoice you created and check if you managed to automatically generate numbers in Excel.

When you start a new invoice, you need to update the information and save the document under a new name. And don’t forget to save it as an “Excel Macro-Enabled Template" document.

What Is an Invoice Number?

An invoice number is an identifying element you assign to your invoice for accounting purposes. It also helps you trace the payment easier and send extra reminders, if necessary. Whenever you need to clarify a matter connected to a particular invoice, this number avoids confusion.

There are three ways to create invoice numbers. The first option is to assign the number manually; the second one is to automatically generate numbers in Excel, following the steps we discussed above. And then there’s the third option - using accounting software that also creates the sequential code identifying the document – the invoice number.

How to Number Invoices?

Each invoice you issue needs a unique number, but there are also a few things you need to keep in mind when you create it. The essential part is to number your invoices sequentially and using an identifier.

Your invoice numbers must be assigned chronologically. As for the structure, you can keep it simple and use only numbers, or you can include the client’s name or the name of the project. What matters is to be able to identify each invoice clearly. Once you learn how to number invoices in Excel, you can avoid duplicates.


Using an invoice number generator is a great way to make sure your invoices don’t get mixed up, and your accounting records remain clear. It’s easy to track an invoice if you issued it with an Excel invoice template with automatic invoice numbering. For the best templates, take a look at the WeInvoice website. You’ll also discover many other handy templates and invoice generators to try for free.