title: Get a filtered range into an array
body: <p>I am trying to get a filtered range into an array, on my test data the array fArr has the proper dim and fLR is the proper count of the filter range</p>
  <p>But filRange  is always only the header range NOT the filtered range</p>
  <p>How to get filRange to be the filtered range?</p>
  <p>Or to the point how to get fArr to be an array of the filter data?</p>
  <p>Thanks</p>
  <pre><code>Sub arrFilterdRng()
  Dim fArr As Variant
  Dim rRange As Range, filRange As Range, myCell As Range
  Dim fLR As Long, rCtr As Long
  
  'Remove any filters
  ActiveSheet.AutoFilterMode = False
  
  '~~&gt; Set your range
  Set rRange = Sheets(&quot;Z&quot;).UsedRange
  
  With rRange
      '~~&gt; Set your criteria and filter
      .AutoFilter Field:=3, Criteria1:=&quot;*&quot;
  
      Set filRange = .SpecialCells(xlCellTypeVisible).EntireRow
      fLR = .Resize(, 1).SpecialCells(xlCellTypeVisible).Count
      Debug.Print fLR
      
      ReDim fArr(1 To fLR, 1 To .Columns.Count)
      Debug.Print UBound(fArr, 1), UBound(fArr, 2)
      
      rCtr = 0
      For Each myCell In filRange.Columns(1)
        rCtr = rCtr + 1
         For cCtr = 1 To .Columns.Count
           fArr(rCtr, cCtr) = myCell.Offset(0, cCtr - 1).value
         Next cCtr
     Next myCell
  End With
  
  'Remove any filters
  ActiveSheet.AutoFilterMode = False
  
  End Sub
  </code></pre>
  <p>My data looks like this (all text)</p>
  <p><a href="https://i.stack.imgur.com/E89HD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E89HD.png" alt="enter image description here" /></a></p>