Consulting

Results 1 to 3 of 3

Thread: Solved: Help with Pivot Tables

  1. #1
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location

    Solved: Help with Pivot Tables

    Please see the attached spreadsheet. On the "Security Filter" sheet, I have two pivot tables, which are both derived from the data on the "Trades" sheet. In cell D4 and E4, as you can see I have %Buy and %Sell. For a selected security type(filter for pivot table) I would like to be able find the % each broker bought out of the total buys. So for example in cell D5, it would be cell B5/ cell B66. And do that same formula for column E. Although, as you change the security filter the pivot table may differ in size so would i get these formulas to be derived for the data displayed in the pivot table? So when I change the pivot table filter, the formulas change to reflect the pivot table.
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use

    =IFERROR(GETPIVOTDATA("Quantity ",$A$3,"Broker ",$A5,"Side",B$4)/GETPIVOTDATA("Quantity ",$A$3,"Side",B$4),"")

    and

    =IFERROR(GETPIVOTDATA("Quantity ",$G$3,"Broker ",$G5,"Side",H$4)/GETPIVOTDATA("Quantity ",$G$3,"Side",H$4),"")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location
    Thats works great!!! Thank you!!!!

Posting Permissions

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