Here are the steps to create an invoice number automatically in excel: Create Your Invoice in Excel. Note the Cell Where Your Invoice Number Is. Select ALT + F11. Double-Click “This Workbook” Revise, Copy and Paste This Code. Adjust Your Macro Settings. Save Document as Macro-Enabled. Restart Your Computer.