Help with GETPIVOTDATA and DATE

datacrunchie

New Member
Joined
Dec 18, 2013
Messages
1
I am looking up data using GETPIVOTDATA, using a number of parameters including country, product name and date. The GETPIVOTDATA formula automatically looks up the appropriate country, product name but when I try to automate the DATE there is a #REF! error. The GETPIVOTDATA formula uses DATE(2013,6,30) for example.

Please could someone help with this?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi and Welcome to MrExcel,

The expression =DATE(2013,6,30) returns the number 41,455 which is the serial date value Excel uses (the number of days since 1/1/1900).
You can put that expression in a cell and format the cell as a number to confirm that.

So based on the parameters you have available, you can replace DATE(2013,6,30) with any expression that will return the serial date value for the date of interest.

If A1 contains the serial date displayed as 6/30/13 you could just replace DATE(2013,6,30) with A1 in your GETPIVOTDATA formula
If A1 = 2013, B1 = 6, and C1 = 30 you could replace DATE(2013,6,30) with DATE(A1,B1,C1) in your GETPIVOTDATA formula

If you have the text value "6/30/2013" in Cell X1, you could replace DATE(2013,6,30) with DATEVALUE(X1) in your GETPIVOTDATA formula
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,659
Members
449,114
Latest member
aides

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