How to print multiple pages of single page spreadsheet with unique invoice numbers?

tsco

New Member
Joined
Nov 12, 2012
Messages
3
I'm a frustrated novice at this!!!

I have a single page spreadsheet. I want to print multiple copies and have a unique invoice number on each page printed in cell O1. I don't want to just send it to the printer as individual print jobs. I would like to send it to print as a pdf in a single 100 page document or if not a pdf then just as a multiple page document.

For example first print run would start at number 1001 and last numbered page is 1101.

Please help, I will be grateful!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi and welcome to the Board
Try this
Code:
Sub MM1()
    For i = 1001 to 1101
        Range("O1").Value = i
        ActiveSheet.Printout
    Next i
End Sub
 
Upvote 0
Wow! Almost there!!! Now is there a way to get it to print into one document instead of going straight to the printer as single page print outs? You're amazing! I love the picture of your doggie too!
 
Upvote 0
Try this
It will create anew sheet called Invoice and the number value in Range("O1")
Thank you about the picture, he was an amazing little friend.
Code:
Sub MM1()
Dim i As Integer
    For i = 1001 To 1101
        Range("O1").Value = i
        With ActiveSheet
            .Copy after:=Worksheets(Worksheets.Count)
            .Name = "Invoice " & Range("O1").Value
        End With
    Next i
End Sub
 
Upvote 0
OMG! You and your doggie are amazing! Thanks! You are brilliant! I've wasted hours for something you just solved for me in minutes. Thank you for sharing your knowledge... and so promptly! :)
 
Upvote 0
Thanks for your feedback, glad it worked....(y)
 
Upvote 0
Try this
It will create anew sheet called Invoice and the number value in Range("O1")
Thank you about the picture, he was an amazing little friend.
Code:
Sub MM1()
Dim i As Integer
    For i = 1001 To 1101
        Range("O1").Value = i
        With ActiveSheet
            .Copy after:=Worksheets(Worksheets.Count)
            .Name = "Invoice " & Range("O1").Value
        End With
    Next i
End Sub


Hello Micheal,

I am more of novice than tsco. I would like to do a similar thing in excel but I would to put in dates. I need a new date per page printed, I only have one spreadsheet saved in my computer. Can I just copy an paste that code and change For i = Monday 8/5/2013 TO Friday 8/1/2014, and where do I paste it? Do I have to open function and put it in there? Sorry, I am an extreme novice.

Thank you,
Barbara
 
Upvote 0

Forum statistics

Threads
1,216,159
Messages
6,129,210
Members
449,493
Latest member
JablesFTW

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top