title: Formula to reference data from a PivotTable
body: <p>I am having some difficulty writing a specific Excel formula. I have a summary sheet that pulls data from various other sheets extracted from a database. One of these is a PivotTable whereby using the Item Number in the first column and the dates along the top row as a reference I can pinpoint the data I need. eg:</p>
  
  <p><img src="https://i.stack.imgur.com/ibuRG.jpg" alt="SO18012089 question first example">   </p>
  
  <p>To address the highlighted cell I would normally manually write:</p>
  
  <pre><code>=GETPIVOTDATA(HighPiv,"SPN010977-204 11333")  
  </code></pre>
  
  <p><code>HighPiv</code> is the name I gave to the pivot table as I am referring to it from my summary sheet.</p>
  
  <p>This works, however the Week numbers along the top will continuously be changing in the pivot every month and therefore this formula will not pick up the values accurately once the pivot is updated. I have been looking into a way to make the referencing more dynamic. This is the summary where the data is required:</p>
  
  <p><img src="https://i.stack.imgur.com/vl0Dk.jpg" alt="SO18012089 second example"></p>
  
  <p>Rather than within the quotation marks of the formula (adding the specific Item number and Week number word for word), I was hoping to refer to the cell references of the summary sheet. (So if I wanted Item number, say <code>A55</code>, and Week number, say <code>H50</code>). The dates in the summary sheet change according to the pivot so referring to the dates on the summaries to get the data would be a better way for it to be kept up-to-date.</p>
  
  <p>The problem here is I don't know how to go about it. I have tired to refer to the cells in question but it doesn't seem to work giving me #REF! or #VALUE! errors.</p>