ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select the 2nd cell from the top in the column with filter (https://www.excelbanter.com/excel-programming/369859-select-2nd-cell-top-column-filter.html)

Henrich

Select the 2nd cell from the top in the column with filter
 
Hi all, i want the select with code the 2nd cell from the top in the column A
which has filtered data so i don't know which line it is (it could be any
depending on the filter settings) and i want to know the position of that
cell when i hit the commandbutton on that sheet. Thanks for help.

PS: Application.sendkeys"^{home}" didn't help

Henrich

Die_Another_Day

Select the 2nd cell from the top in the column with filter
 
Try this loop.
Sub FindNextVisible()

Dim cnt As Long
Dim Filtered As Boolean

Filtered = False
cnt = 1
Do
Filtered = Rows(Range("A1").Offset(cnt, 0).Row).Hidden
cnt = cnt + 1
Loop While Filtered
MsgBox "A" & cnt

End Sub

Charles Chickering

Henrich wrote:
Hi all, i want the select with code the 2nd cell from the top in the column A
which has filtered data so i don't know which line it is (it could be any
depending on the filter settings) and i want to know the position of that
cell when i hit the commandbutton on that sheet. Thanks for help.

PS: Application.sendkeys"^{home}" didn't help

Henrich



Henrich

Select the 2nd cell from the top in the column with filter
 
Charles,

thanks many time, it's working PERFEKT!!!

Henrich


€žDie_Another_Day" napĂ*sal (napĂ*sala):

Try this loop.
Sub FindNextVisible()

Dim cnt As Long
Dim Filtered As Boolean

Filtered = False
cnt = 1
Do
Filtered = Rows(Range("A1").Offset(cnt, 0).Row).Hidden
cnt = cnt + 1
Loop While Filtered
MsgBox "A" & cnt

End Sub

Charles Chickering

Henrich wrote:
Hi all, i want the select with code the 2nd cell from the top in the column A
which has filtered data so i don't know which line it is (it could be any
depending on the filter settings) and i want to know the position of that
cell when i hit the commandbutton on that sheet. Thanks for help.

PS: Application.sendkeys"^{home}" didn't help

Henrich





All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com