Results 1 to 6 of 6

Calculations from Pivot Table data

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,066

    Calculations from Pivot Table data

    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
    Attached Files Attached Files
    Last edited by Mordred; 08-30-2011 at 01:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1