using formulas to sum on various pivot table columns using criteria from other tabs and tables

Sfraizingr

New Member
Joined
Oct 19, 2016
Messages
1
Hello,

I have the following formula on one tab of my workbook which presents a client directed view of costs and hours for groups of resources which are described in a pivot table on another tab.

=GETPIVOTDATA("Sum of Tot.Pro.Hrs",'Resource Costs by Phase'!$B$3,"Short_Code",E9,"LU.WP.Code","CL-M")

where

"Sum of Tot.Pro.Hrs" is the name of one of the columns in the pivot table
'Resource Costs by Phase" is the name of the tab in which the pivot table resides
B$3 is the top leftmost cell of the pivot table
"Short_Code" is the column header on the pivot table which correlates the unique resource code which is matched to cells in column E
"LU.WP.Code" is the column header on the pivot table which correlates the unique resource grouping code which is matched to the text "CL-M"


the pivot table has the following column headers

LU.WP.CodeShort_CodeSum of Tot.Pro.HrsSum of Tot.CostSum of Tot.Pro.PT.HrsSum of Tot.PT.CostSum of CD0.Pro.HrsSum of CD0.CostSum of CD1.Pro.HrsSum of CD1.CostSum of CD2.Pro.HrsSum of CD2.CostSum of CD3.Pro.HrsSum of CD3.CostSum of CD4.Pro.HrsSum of CD4.CostSum of CD5.Pro.HrsSum of CD5.CostSum of CD6.Pro.HrsSum of CD6.Cost

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup>


I am looking for a way to modify the formula so that based on a cell value inputted by the user on another tab altogether, I can have the formula sum on different columns of the pivot table. So for example: if the user inputs values such that the cell reference reads CD-03 the formula would select the values in the column with header "Sum of CD3.Pro.Hrs"

Any help would be greatly appreciated
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
New Member
Join Date
Dec 2015
Location
Keston, Kent
Posts
3
Default Dynamic PowerPivot GETPIVOTDATA Formula Syntax
Hi,


I want to pull in data from a pivot which has month columns, and then paste the formula along without having to manually change the month column. This is how the formula looks:


=+GETPIVOTDATA("[Measures].[Sum of Nov-15]",Sales4Budget!$E$16,"[ALLSALES].[End_Client]","[ALLSALES].[End_Client].&[ALLCLIENTA]").


So I want to change the [Sum of Nov-15] to the pivot column cell reference instead so I can paste the formula. Why is this so difficult?


Welcome to the forum.


What is the cell reference and what exactly is in the cell?
Share
| Like
Rory
Microsoft MVP - Excel


The cell reference and pivot is on another tab. Sales4Budget!$G$16 and has "Sum of Nov-15" in the cell.
Share

In that case the formula should be:


=GETPIVOTDATA("[Measures].["&Sales4Budget!$G$16&"]",Sales4Budget!$E$16,"[ALLSALES].[End_Client]","[ALLSALES].[End_Client].&[ALLCLIENTA]")
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top