Changing a number in each time I print

42,982

Solution 1

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

Solution 2

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

Edit

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:
42,982

Related videos on Youtube

khalid
Author by

khalid

Updated on September 17, 2022

Comments

  • khalid
    khalid almost 2 years

    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?

    • khalid
      khalid over 13 years
      i will printing all in one run, then in the future maybe i want to continue and repeat it .. thanks
  • xdumaine
    xdumaine over 13 years
    or if you're going to use the same printer each time, and always print 100 copies, you can skip step 1.
  • khalid
    khalid over 13 years
    the only problem is that i can't start from 100 or 1000, always it's start from 1
  • Greg Jennings
    Greg Jennings over 13 years
    Change this line: For copynumber = 1 To CopiesCount as For copynumber = 100 To CopiesCount