title: Get Last Row From Filtered Range
body: <p>How do you find the last row of data when the data in your worksheet is filtered? I have been playing around with <code>Special Cells</code> and <code>Visible Cells</code> but cannot find a solution. I think it must be some kind of variation on what I have below:</p>
  
  <pre><code>    ...
      With ws
          LR = .Range("A" &amp; Rows.Count).End(xlUp).Row
          .Range("A1:E" &amp; LR).AutoFilter Field:=2, Criteria1:="=4"
          LRfilt = .Range("A" &amp; Rows.SpecialCells(xlCellTypeVisible).Count).End(xlUp).Row
          Debug.Print LR
          Debug.Print LRfilt
      End With
      ...
  </code></pre>
  
  <p>File can be found here:</p>
  
  <p>wikisend.com/download/443370/FindLRFilteredData.xls</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Realised after discussion with Siddharth I did not want the <code>Last Row</code> property I needed to find a count of the number of visible rows which led on to Sid's solution below...</p>