FROM MASTER RECORD HOW TO MODIFIED THE EXISTING MACRO TO GENERATE AN INVOCIE TO DISPLAY MULTIPLE ITEMS PER INVOICE ?
So I think what you want is to show all the items with the same Inv number on the Master Sheet, on the same Invoice template?
Yes ... but not sure how to modified the Macro to suit the purpose
Hi David
You should provide a sample Invoice with details.
Let us know which column of your data goes to which part of the Invoice. It will be much clearer to us.
Are you going to enter the Invoice number one by one and then let the macro generate the Invoice or are you expecting the macro to create multiple invoices at one go?
Will the Invoices be in a separate file by itself or all in the same file as your data?
Sunny
Thanks Sunny !
Separate Invoice file, already using the Split macro, but to include multiple items per univque invoice number per Master worksheet
Pls refer attached sample Inovice
Invoice showing multiple items generate from Master record
but now existing macro can only generate one item on the output invoice.
Hi David
Lately I have been experimenting to do such thing using a PivotTable instead of a macro.
Don't mind if I use you as my 1st "victim"
Even if it is not suitable to you, I hope to receive your precious feedback.
Sunny
Perfect Sunny!
But really need to split the Inovice one by one and send to Customer, what to do next , pls help further...
But really need to split the Inovice one by one and send to Customer, what to do next , pls help further...
Hi David
Refer attached.
The macro is called CreateInvoice.
Hope this helps.
Sunny
Sunny. The macro works perfectly. Thanks again...
BTW , can we use the Pivot Table, the idea you demonstrate earlier and using the Page Field to split these Invocie Files but base on user fixed Template layout format.
Hi David
Attached is the final product using Pivot Table (applicable for a single invoice selection only.)
The selection button on the Template sheet is actually a Pivot Table report filter (excluding the Pivot Table as I don't need it) with custom formatting.
The Slicer is the key to link all 3 Pivot Tables when an Invoice number is selected.
Hope you like it.
Sunny
David_Ng said
Sunny. The macro works perfectly. Thanks again...BTW , can we use the Pivot Table, the idea you demonstrate earlier and using the Page Field to split these Invocie Files but base on user fixed Template layout format.
Hi David
Are you referring to dropping the Invoice field into the Report Filter area and then selecting Options-Options-Show Report Filter Pages from the Ribbon? I don't think that is possible using a template.
Furthermore separating data using this method will only create filtered tables with ALL the data and I don't think you want to send such PT to your customers. You will then need to paste all the PT as values before sending them and it is very time consuming.
Anyway I attached my updated version using only Pivot Tables (no linking formula to templates).
There is also a Slicer (need it to connect all the PTs) but I have hidden it so it is not visible.
I am having some difficulties drawing the borders for the template as the PT keeps overriding them. So I left them out till I (hopefully) find a solution.
Sunny
THANKS SUNNY.FULLY UNDERSTAND THE LIMITAION.
BUT NOW WHEN I CHANGE THE TEMPLATE LAYOUT PLS REFER, NOW CAN NOT USE THE MACRO TO ALLOT THE DATA INTO THE TEMPLATE PLS HELP TO TIDY UP ADN RESHUFFLE THE CODE A BIT
Hi David
Is this another template? It is totally different from the one you gave earlier.
The macro given my me is not generic and cannot be used for other templates.
From your latest file the Master sheet looks incomplete as some details shown in the template (like name, address etc) is not found in the master sheet
Please supply the complete master list.
In your template, please show one expected result with actual data from your attached Master file and not something else (like in your attachment) that cannot match at all.
This will allow us to take out the guessing work that can waste a lot of time.
Sunny
Hi David
Please refer attached.
I have left out many details such as Address Tel, Fax, Attn etc from the Invoices as the details are not available in your Master file.
I noticed that there are multiple LOR No for each Invoice but your template only required one so I printed the first LOR No. only.
Sunny