Getpivotdata & vlookup

lostexcelnewbie

New Member
Joined
Jun 1, 2015
Messages
2
Hello All,

I am trying to pull data from a pivot table, but I want one of the criteria in the formula to change based upon another column in the same row as the formula.

What I have so far is this.

=GETPIVOTDATA("AMOUNT",PriorActualLookup!$A$4,"Project Exp Month","January","PROJ #","7356")

What I want to change is the "7356" to change based upon what is listed in column A2 so that I can copy and paste the formula down. Any ideas ?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to MrExcel,

You've probably already tried substituting "7356" with a reference to A2..
....,"January","PROJ #", A2)

Notice that "7356" is in quotes, which means that it is a Text value instead of a Numeric value.

Because of that, if the value in A2 is the Text value "7356" then substituting "7356" with a reference to A2 would work as you intended.

Since you are posting the question, the value in A2 might be the Numeric value 7356 which would cause the formula to return a #REF error.

You could convert the value in A2 to Text or you could modify your formula to covert a Numeric argument to Text like this...

=GETPIVOTDATA("AMOUNT",PriorActualLookup!$A$4,"Project Exp Month","January","PROJ #", A2&"")
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,178
Members
449,071
Latest member
cdnMech

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