Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Do you need to do all the printing in one run, or are you going to open the file, print once, close, repeat sometime later? – Piskvor Oct 27 '10 at 12:41
i will printing all in one run, then in the future maybe i want to continue and repeat it .. thanks – khalid Oct 27 '10 at 12:43
up vote 2 down vote accepted

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
share|improve this answer
wooow, it's wok thanks alot – khalid Oct 28 '10 at 6:02
You're welcome. – Mehper C. Palavuzlar Oct 28 '10 at 6:39
the only problem is that i can't start from 100 or 1000, always it's start from 1 – khalid Nov 25 '10 at 12:01
Change this line: For copynumber = 1 To CopiesCount as For copynumber = 100 To CopiesCount – Mehper C. Palavuzlar Nov 25 '10 at 15:01

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:

  1. Prompt for number of copies and printer name
  2. Set The invoice Number cell to 0
  3. Loop for number of copies
    1. Increment the invoice cell number
    2. Print the document to printer name


This page has an example of it for Word, so you could just adapt this to excel. This page has a rough example for excel

share|improve this answer
or if you're going to use the same printer each time, and always print 100 copies, you can skip step 1. – xdumaine Oct 27 '10 at 13:27
thanks alot for ur help – khalid Oct 28 '10 at 6:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.