I'm using the below code to get the count of the filtered data rows in VBA, but while getting the count, it's giving the run time error showing:
"Object required".
Could some please let me know what change(s) is needed?
Set rnData = .UsedRange
With rnData
.AutoFilter Field:=327, Criteria1:=Mid(provarr(q), 1, 2)
.Select
.AutoFilter Field:=328, Criteria1:=Mid(provarr(q), 3, 7)
.Select
.AutoFilter Field:=330, Criteria1:=Mid(provarr(q), 10, 2)
.Select
.AutoFilter Field:=331, Criteria1:=Mid(provarr(q), 12, 2)
.Select
Rowz = .AutoFilter.Range.SpecialCells(xlCellTypeVisible).Rows.count
....
End With