VBA to return properties of a pivot table value RRS feed

  • Question

  • I can use a formula to reference a value in the data area of a pivot table, and get this:

    =GETPIVOTDATA("Labor % ",$A$1,"Q","Q1","P","P1","W","W1","Store #","Store 1090")

    Here's what I'm really trying to do. I want to cycle through the values in the pivot table. For each value I need to capture the elements in that GetPivotData function, then use those to reference a value in a standard table and compare the two values. If the pivot table value is lower I want to paint the font red. 

    So if the Labor % value is in Q1, P1, W1, Store 1090, I have a table that tells me what the goal is for that value. I want to compare them.

    If I'm going the long way around just tell me. Ultimately I'm attempting to use VBA to apply conditional formatting to the values in a pivot table based on goals for each value.

    Good luck!



    Wednesday, February 10, 2016 3:11 AM