I figured out how to get count of filtered dataset but the count is not useful.
Here is example code that works for me.
Code:
Dim objExApp As Excel.Application, objWB As Excel.Workbook, objWS As Excel.Worksheet
Dim rngData As Excel.Range, rw As Excel.Range, RowCount As Integer, StrToCompare As String
Set objExApp = CreateObject("Excel.Application")
Set objWB = objExApp.Workbooks.Open("C:\Users\june\Condos.xlsx")
Set objWS = objWB.Worksheets("Sheet1")
Set rngData = objWS.Range("A1").CurrentRegion
objExApp.Visible = True
StrToCompare = "OK"
objWS.AutoFilterMode = False
objWS.Range("A1").AutoFilter Field:=3, Criteria1:=StrToCompare
RowCount = rngData.Columns(1).SpecialCells(xlCellTypeVisible).Count
For Each rw In Intersect(objWS.UsedRange, objWS.Range("A:A").SpecialCells(xlCellTypeVisible))
Debug.Print objWS.Range("A" & rw.Row)
Debug.Print objWS.Range("B" & rw.Row)
Next
Well, sort of works. Seems to leave Excel process running even after closing Excel and that causes an error next time procedure runs. Rats!
This variation doesn't seem to have that issue.
Code:
For Each rw In rngData.SpecialCells(xlCellTypeVisible)
If rw.Address Like "*A*" Then Debug.Print objWS.Range("A" & rw.Row)
If rw.Address Like "*B*" Then Debug.Print objWS.Range("B" & rw.Row)
Next