Hello -
I have been using Excel for a while, but pretty new to the macro/vba part.
I have a master worksheet that contains all of the relevant data that I am using, and a separate worksheet the creates a clean invoice. To create the sheet, I type the Invoice number (5 digits) into the bottom of the "Invoice" worksheet and it automatically pulls the data from the master worksheet and populates the invoice sheet with all the other information needed (date, price, etc). Which I can then print off for our customer. But when I am printing invoices I do it by batches of several hundred at a time. There is a column in the master sheet that lists the date that I am printing the invoice.
So ideally, I would have a macro that would check the "Invoiced Date" column on the master list, find each of the invoice numbers for that date, and then individually insert them into the "Invoice" worksheet and automatically print that sheet.
For right now, it is relatively simple to filter for today's "Invoiced Date", then cut and paste that list onto a temp worksheet. Then I do have macro that will allow me to just hit "Ctrl-P" and it will print that invoice and return me to the sheet, like so:
Sub PrintInvoice()
'
' PrintInvoice Macro
'
' Keyboard Shortcut: Ctrl+p
'
Selection.Copy
Sheets("Invoice").Select
Range("C30:D30").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Sheets("Data Input").Select
End Sub
If I can't automate the whole process, can I at least make it so that the above macro will repeat itself all the way down the temp invoice list? All I have been able to do with the Range formula is get it to print one invoice with 10 numbers on it (as a test) instead of printing 10 invoices, one for each number.
Any help - even just pointing me in the right direction - is much appreciated.
Sorry for the rule breaking, I was in a rush. Hope it is fixed now.
Bookmarks