Hi Baba,
Try with the below code :
Note : You can also know the filetered rows count using below way too.
Try with the below code :
Code:
xlCellTypeVisible =12
set oExcel = createobject("Excel.Application")
oExcel.visible = true
oExcel.Workbooks.Open ("C:\..\..\..\sample.xls")
Set sRange = oExcel.Range("C1", "C99").SpecialCells(xlCellTypeVisible)
temp_row=0
For Each cell in sRange
temp_row=temp_row+1
If temp_row = 1 Then
Print "#####Column Header Row#####"
Else
d=split(cell.Address,"$")
print "Filtered row # "&temp_row-1&" : "&Cell.Value &" and its Excel Row# : "&d(2)
End If
Next
Filtered_Rowcount=temp_row-1
Print "Numer of Filtered rows:"&Filtered_Rowcount
oExcel.ActiveWorkBook.Save
Set oExcel=Nothing
Code:
Msgbox sRange.Count-1