When a Table is declared, is there something else that I need to do to loop through filter rows?
lr4 = 76 rows, however, based on the filter applied only one row shows up, and that is row 2, row 1 being my header.
What I don't understand is the loop is adding the data in each .Cells(r,6) from 2-76. Based on the applied filter only row 2 is visible. I would assume from my code only data from .Cells(2,6) would be applied to eto.
What am I missing? Thank you.
VBA Code:
With ws5
.ListObjects(1).AutoFilter.ShowAllData
.ListObjects("Table1").Range.AutoFilter 1, dlr, xlFilterValues
.ListObjects("Table1").Range.AutoFilter 2, dept, xlFilterValues
lr4 = .Cells(.Rows.Count, 1).End(xlUp).Row
For r = 2 To lr4
If .Rows(r).Hidden = True Then Debug.Print r 'Confirming if row r is hidden
If .Rows(r).Hidden = False Then eto = .Cells(r, 6) & ";" & eto
Next r
End With
lr4 = 76 rows, however, based on the filter applied only one row shows up, and that is row 2, row 1 being my header.
What I don't understand is the loop is adding the data in each .Cells(r,6) from 2-76. Based on the applied filter only row 2 is visible. I would assume from my code only data from .Cells(2,6) would be applied to eto.
What am I missing? Thank you.