title: How to auto refresh Excel auto-filter results after Excel PivotTable auto update
body: <p>I have created a "Summary" tab using an Excel Pivot Table.</p>
  
  <p>The Pivot Table shows the sums of selected values in various categories stored in a "Details" tab.</p>
  
  <p>The Details tab contains...</p>
  
  <pre><code>Select?   Type   Price
     Y      Shoe   $1.25
     N      Shoe   $1.50
     Y      Boot   $2.00
     N      Clog   $3.00
     Y      Shoe   $0.50
  </code></pre>
  
  <p>The Summary tab shows a Pivot Table like this...</p>
  
  <pre><code>Select?       Y
  
  Row Labels    Sum of Price
  Boot          $2.00
  Shoe          $1.75
  </code></pre>
  
  <p><strong>Whenever something is changed in the Details tab, and someone switches to the Summary tab, I want the Pivot Table to auto update to match the new data.</strong></p>
  
  <p>This is easy if just the values change (using the first code snippet below), but if the Y and N change, the filtering does not update. Anything that has changed from N to Y is not shown until the filtering is manually updated.</p>
  
  <p><em>This is what I have so far...</em></p>
  
  <p>The code to auto-update a Pivot Table is e.g. ...</p>
  
  <pre><code>Private Sub Worksheet_Activate()
      Sheets("Summary").PivotTables("PivotTable1").RefreshTable
  End Sub
  </code></pre>
  
  <p>The code to auto-refresh an Excel auto-filter column in a table (that's <em>not</em> a Pivot Table) is e.g. ...</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
      With ActiveWorkbook.Worksheets("Details").ListObjects("Table1")
           .AutoFilter.ApplyFilter
      End With
  End Sub
  </code></pre>
  
  <p>...but I cannot figure out how to apply AutoFilter.ApplyFilter to a Pivot Table. Any ideas? Or Equivalent?</p>
  
  <p>The nearest thing I found to touch the Pivot Table filter is this code which will turn the part I want to update yellow...</p>
  
  <pre><code>Worksheets("Details").PivotTables("PivotTable1") _
      .PageRange.Interior.Color = vbYellow
  </code></pre>
  
  <p>...but I don't want to turn it yellow :-) , I want to re-apply the filter to the modified data so I see what I <em>should</em> see, rather than the wrong values and missing rows.</p>
  
  <p>Many thanks.</p>