Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return value from a pivot table
I have a pivot table that looks something like this:
Product1 Product2 Product3 Week1 2500 500 0 Week2 200 35 800 Week3 150 5000 3 Where the numbers are quantities of their corresponding product required by week. In my current code I have variables that contain the column name and the row name (i.e. varProduct and varWeek). How do I get the value of the quantity that corresponds to the variables? Thanks! -- -------JKY<------- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return value from a pivot table
Joseph K. Young wrote:
In my current code I have variables that contain the column name and the row name (i.e. varProduct and varWeek). How do I get the value of the quantity that corresponds to the variables? One way would be to use the worksheet GETPIVOTDATA function. V = Application.Evaluate("GETPIVOTDATA(Sheet4!A1,""" & varProduct & " " & varWeek & """)") where you would replace Sheet4!A1 with the address (or range name) of a cell in your pivot table. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need pivot table data to return the value rather than sum, count, | Charts and Charting in Excel | |||
Pivot Table: Return Value From Same Row | Excel Discussion (Misc queries) | |||
Using a Pivot Table to return top entries only | Excel Discussion (Misc queries) | |||
Pivot Table: Compunding Return instead of Adding it? | Excel Discussion (Misc queries) | |||
how do I make hard carriage return appear in pivot table? | Excel Discussion (Misc queries) |