title: How to loop through each active (non filtered) element in a Pivot Table (excluding the column labels and grand totals)?
body: <p>I was expecting the fields to be "Sum of Reg Hrs.", "Sum of Reg OT Hrs.", ... , "Sum of SNWH NSD Hrs."</p>
  
  <p>But what I got was <code>MsgBox pf</code> shows "Values" </p>
  
  <p><code>Msgbox pi</code> shows "Sum of Reg Hrs.", "Sum of Reg OT Hrs.", ... , "Sum of SNWH NSD Hrs."</p>
  
  <p>But ideally, I want <code>pi</code> to be the items of each column. Is there another method to do so?</p>
  
  <pre><code>Sub test()
  
  Dim pt As PivotTable
  Dim pf As PivotField
  Dim pi As PivotItem
  
  Set pt = ThisWorkbook.Worksheets("N-MR Hours Summary").PivotTables("N-MR Hours Summary")
  
  For Each pf In pt.ColumnFields
      MsgBox pf
      For Each pi In pf.PivotItems
          MsgBox pi
      Next pi
  Next pf
  
  End Sub()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/17Dcj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/17Dcj.png" alt="enter image description here"></a></p>
  
  <p>Also, it should only include, the active cells (non filtered cells), but I realized even the filtered cells are iterated about.</p>