The attached example contains a pivot table. In the data area ("MOS2") the headings are months of the year that contain expense or encumbrance information. What I want to do is get an average of the past 3 months (so, in this example, months 2-4). I'll be doing this for multiple pivot tables in multiple workbooks on a monthly basis.
As you can see in the example, not all months appear (if nothing happened, they don't show). So, I need a macro that will first look at the months in the pivot, decide if any of them are from the last 3 months, and if so, add those three months and divide by 3 to get an average. I can do the last part of that, but don't know how to determine which months belong to the last 3 months, so would appreciate some help with that.
Next step (if anyone wants to tackle it) is to do the annual projection; basically, the average times 12, or if that's less than the Total (which is the YTD), put the total.
Thanks in advance,
John
Bookmarks