01-12-2010, 10:56 AM
You can try something like
I have concidered only the first column here which is already filtered. and assumed the first row is your header row and 15th row is the last used row in your excel
hope this will helps you.
Code:
xlCellTypeVisible =12
set oExcel = createobject("excel.application")
oExcel.visible = true
oExcel.Workbooks.Open ("D:\My QTP\Excel Issue\AFIFLONG\AFIFLONG.xls")
Set sRange = oExcel.Range("A2", "A15").SpecialCells(xlCellTypeVisible)
For each cell in sRange
msgbox cell.address
Next
I have concidered only the first column here which is already filtered. and assumed the first row is your header row and 15th row is the last used row in your excel
hope this will helps you.