title: VBA: Retrieve cell value from each row in Range.Area
body: <p>The main goal is: Retrieve specific cell values from each row in a filtered table by using column reference name.</p>
  
  <p>So far, I have the following code</p>
  
  <pre><code>Dim table As listObject
  Dim columns As ListColumns
  Dim row As ListRow
  Dim rnData As range
  Dim rngArea As range
  
  Set table = Sheets(sheetName).ListObjects(TableName)
  Set columns = table.ListColumns
  Set rnData = ThisWorkbook.Worksheets(sheetName).ListObjects(TableName).range 
  'Notice that sheetName and TableName are function arguments. No need to pay attention. Consider any string values.
  
  'Filter my table
  table.range.AutoFilter Field:=7, Criteria1:=Array("filtervalue1", "filtervalue2"), Operator:=xlFilterValues
  
  'Set the filtered table in a new Range object
  Set rnData = ThisWorkbook.Worksheets(sheetName).ListObjects(TableName).range
  
  'Count all rows of my filtered table
  With rnData
      For Each rngArea In .SpecialCells(xlCellTypeVisible).Areas
          lCount = lCount + rngArea.Rows.Count
      Next
  End with
  </code></pre>
  
  <p>Now I want to loop my filtered table (my "rnData" range) and I want to get the cell value for each row in those Range.Areas. </p>
  
  <p>I was thinking something like this, but i'm having difficulties with VBA to do this:</p>
  
  <pre><code>For iRowNo = 2 To (lCount - 1) 'Start at 2 because 1 is the table header
              'This does not work once it gets another row from the entire table. Not the filtered one. Help here!
              Set row = table.ListRows(iRowNo)
  
              'Something close to this - Help Here!
              Set row = rnData.SpecialCells(xlCellTypeVisible).Areas 
  
              ''Would like to have the code like this to get the values
              cell1Value= row.range(1, columns("My Column Header 1").Index).value 
              cell2Value= row.range(1, columns("My Column Header 2").Index).Value
  
  Next iRowNo
  </code></pre>
  
  <p>Let me know if there are different solutions than this.</p>