Hi all!
I'm trying to make my Turnover Analysis a bit more time efficient using macros and VBA. I allready got so far that by clicking on a button a macro imports turnover data from a different excel file.
Data:
A9-A100: Days (Format: YYYY-MM-DD), starting A9
B8-AA8: Customers Names
AB9-AB100: Totals
A101: Totals
Now I'm at a point where I don't get any further...
1. Box01 and Box02:
I need to have a Box, lets name it "Box01" with a drop down menu that includes all names from row "B". Since the imported data and customers names may differ over time Box01 schould update the new names automatically, too.
I also need a second box "Box02". With Box02 I want to choose between the timeframes "All", "24 Months", "12 Months", "YTD" (Year-to-date), and "1 Month".
2. Graph
This might be more complicated... I now want to select a Customer in Box01, lets call him "CustAAA", and a the timeframe "1 Month" in Box02. Then I press "Button02". This now should do the following: create a column chart with the turnovers of "CustAAA" of the last 12 months. Last date in column A is 2009-12-15. It therefore should include all dates beginning 2008-12-15 (if this day is not in the list due to a holiday or weekend it should take the next availaby date e.g. 2008-12-17). The macro can not just jump to row 100 because the list will get longer each day. It also can not jump to the last number in the column, because this is the "Total".
By selecting "CustBBB" in Box01 and "YTD" in Box02 the macro shall make a chart with the turnovers of "CustBBB" including all data from the recent year. Today selecting YTD should range from 2009-01-01 (this is a holiday so take next day available) until 2009-12-15. Selecting YTD on January 10th next year therefore should range from 2010-01-01 (holiday -> take next day available) until 2010-01-09.
Ideally the headline of the chart would include the selected customers name ;-)
If anyone would be able to solve only part of my problem please post the code that would help me, too!
Thanks a lot for your effort!!!!
Bookmarks