title: Excel VBA loop through visible filtered rows
body: <p>I have a excel table with a autofilter.</p>
  
  <p>In the filtered table i only have few rows filtered.</p>
  
  <p>My objective is icterate all visible rows to colect data to copy to anothe sheet.</p>
  
  <p>I want a way to collect a variable with the the fisrt visible row number.</p>
  
  <p>my draft code is:</p>
  
  <pre><code>Dim cnp As String
  Dim nome As String
  Dim filter_rng As Range
  Dim rw As Range
  Dim last_row As Long 'last visible data row
  Dim dest_row As Long 'row to paste the colected data
  
  Set filter_rng = Range("A5:Y" &amp; last_row).Rows.SpecialCells(xlCellTypeVisible)
  'collect data
  For Each rw In filter_rng.SpecialCells(xlCellTypeVisible)
      workshett(1).Activate
      cnp = Range("a" &amp; rw).Value
      nome = Range("b" &amp; rw).Value
  
  'copy data to another worksheet first data line is cell A2
      Worksheet(2).Activate
      Range("A" &amp; dest_row + 1).Value = cnp
      Range("b" &amp; dest_row + 1).Value = nome
  
  Next rw
  </code></pre>