title: How to use a reference for GetPivotData's Data_Field argument?
body: <p>I'm trying to use <a href="http://office.microsoft.com/en-ca/excel-help/getpivotdata-HP005209107.aspx" rel="noreferrer"><code>GetPivotData</code></a> to query "Foo Bar" values from a pivot table. Just by typing <code>=</code> in a cell and clicking on the pivot table does most of the legwork, as Excel writes most of the formula. For example I get:</p>
  
  <pre><code>=GETPIVOTDATA("Foo Bar", 'Pivot Table'!D1, "Day", DAY(2010,10,10))       → 42
  </code></pre>
  
  <p>I need to have the first and last argument referenced to other cells and some extra dollars. I tried:</p>
  
  <pre><code>=GETPIVOTDATA($A$1, 'Pivot Table'!$D$1, "Day", $C3)                       → #REF!
  </code></pre>
  
  <p>...where <code>A1</code> contains <code>Foo bar</code> and <code>C3</code> contains <code>=DAY(2010,10,10)</code>.</p>
  
  <p>This obviously gives a nice <code>#REF!</code>. Hardcoding the field name in the formula instead gives the correct value instead:</p>
  
  <pre><code>=GETPIVOTDATA("Foo Bar", 'Pivot Table'!$D$1, "Day", $C3)                 → 42
  </code></pre>
  
  <p>Is this an <em>undocumented</em> shortcoming of the function (all examples use an hardcoded field name, but nowhere is mentioned I can't use references for the first argument) or am I doing something wrong?</p>