Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Thank You very much for another assistance. Yours sincerely Mark -----Original Message----- Public Function GetRange(lIdex as Long, MaxRow as Long) as Range Dim rng As Range, rng1 As Range Dim llIndex As Long Dim Maxrow as Long With Worksheets("Sheet2") If .AutoFilterMode Then Set rng = .AutoFilter.Range Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1, 1) On Error Resume Next Set rng1 = rng.SpecialCells(xlVisible) On Error GoTo 0 End If End With If Not rng1 Is Nothing Then MaxRow = rng1.count llIndex = 0 For Each cell In rng1 llIndex = llIndex + 1 If llIndex = lIdex Then set GetRange = Cell Exit For End If Next Else MaxRow = 0 set GetRange = Nothing End If End Function Call this function with the number of the visible row you want in the filter. Dim MaxVisible as Long set myRow = GetRange(1,MaxVisible).EntireRow msgbox "1st record of " & MaxVisible & " records is at absolute row: " & myRow.row as an example would set myRow to the first visible row (below the header row) and MaxVisible would tell you the number of visible rows If myRow is nothing, then Check MaxVisible - you might have requested a row that is more than the max visible. -- Regards, Tom Ogilvy "Mark" wrote in message ... Hi, I have chosen criterion in my autofilter and i'd like select some cell in first row with data selection. Any offset does't work. Can anyone assist ? Best regards Mark . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
list choice depending on the value in another cell | New Users to Excel | |||
User choice listed in cell. | Excel Worksheet Functions | |||
Need to link dropdown box choice to another cell | Excel Discussion (Misc queries) | |||
How do I set up a drop down choice in a cell | Excel Discussion (Misc queries) | |||
limit choice in cell to one of two values; | Excel Discussion (Misc queries) |