Hi.
I'm trying to create a Report for my boss and have run into a problem.
Things to know:
A) I don't know how to code VBA, I only have experience in "recording" macros.
B) I have a raw data table, it has many columns, but the columns/data I will be drawing from are:
Vendor, Invoice Date, Invoice Amount,Overbilled
(note: Invoice Date stretches from 1st jan 2008 - current day).
Firstly, I create a pivot table form this raw data using the *insert Pivot Table* function.
The pivot table is set out such that:
1. I drag "Vendor" into the left cell of the table.
2. I drag "Overbilled" into the top right row of the table
3. I drag "Invoice Amount" into the bottom right cell of the table
4. I right-click and *expand* the "Vendor" column to show "Invoice Date"
C) This gives then gives me a table that tells me the total dollar value of the overbilled invoices, per vendor. I then sort the list so that the Vendor is sorted by Invoice Amount from Largest to Smallest. I then highlight the top 10 in Red. This gives me the top 10 worst overbillers, plus the date of each overbilled invoice.
....This is where it gets tricky....
What I want to do:
I want to record a Macro to go through each of the "Top Ten" Vendors and for each of them, create a chart that has:
X-Axis: Invoice Date
Y-Axis: Invoice Amount
I could do this statically, but in the long term I want to be able to run a report at the end of each month that does this entire process automatically for me. The top 10 is obviously going to change over time so I need it to be equally dynamic.
However when I go to the pivot chart and try to filter the Vendors, I can't filter it by using the "Top 10" list... it only allows me to manually choose which Vendor to filter. Obviously this will cause trouble when I try to do it as a recorded macro.
Thanks in advance for any help and sorry if it wasn't very clear. If I have left out any information or you require any further clarification, please contact me. Very much appreciated.
Cheers!
Adam
Bookmarks