I have an Excel sheet I use as an invoice.
I want to print 100 pages and I want the invoice number to change from 1 to 100, so that each paper will have different invoice number.
How can I do this?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You need a macro for that. I found the following macro and made some changes on it. Try it to see if it works correctly:
Sub PrintCopies_ActiveSheet() Dim CopiesCount As Long Dim copynumber As Long CopiesCount = Application.InputBox("How many copies do you want?", Type:=1) 'Now the program wants you to input how many pages you like to print. 'You can input 100 here. For copynumber = 1 To CopiesCount With ActiveSheet .Range("E1").Value = copynumber 'I assume your invoice number is in cell E1. .PrintOut 'Print the sheet End With Next copynumber End Sub
I would use a macro to do this, as there doesn't seem to be an easy, built in method of doing this. The outline of the macro would be pretty simple. Something of this nature: