HI, I am having an issue with counting the visible rows after an autofilter has been applied.
Code
- Sub test()
- lr = ThisWorkbook.Sheets("Air Data").Cells(Rows.Count, "A").End(xlUp).Row
- ThisWorkbook.Sheets("Air Data").Range("A1:AE1").AutoFilter _
- Field:=5, Criteria1:="", visibledropdown:=True
- vis_lr = ActiveSheet.AutoFilter.Range.Rows.SpecialCells(xlCellTypeVisible).Count
- Debug.Print lr
- Debug.Print vis_lr
- End Sub
lr works fine but vis_lr is not the right count.
Can anyone assist in solving this please?
Dave