If there is a change then the FilterData code in module 1 gets invoked to change the data that Advanced Filter Extracts to sheet Extract, and then used on sheet Invoice. Private Sub Worksheet_Change(ByVal Target As Range) Sheet Invoice has some event code which gets triggered only when you change the Order number in cell C2 Invoice uses the Transpose() function to turn the Extracted data from Horizontal to Vertical, and then uses Index(), Match() to pull through the price from your table 2 on Blad2 and then multiplies these by quantity to produce the line Totals which get Sumed at the end and have tax added. xlsb as it contains two small macros, I have inserted 2 new sheets called Extract and Invoice.Įxtract uses Advanced Filter to extract any given Order Number from your Tale 1 on Sheet 1. In the attached file, which has been saved as a. Using a Pivot Table to generate an Invoice in this case, is not the best solution in my opinion.
0 Comments
Leave a Reply. |