1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need a Code to Select the 10th Visible row of the filtered data

Discussion in 'VBA Macros' started by chand1230, Feb 12, 2019.

  1. chand1230

    chand1230 New Member

    Messages:
    12
    Thanks in advance,

    Need a Code to Select the 10th Visible row of the filtered data

    Attached Files:

  2. vletm

    vletm Excel Ninja

    Messages:
    4,793

    Attached Files:

  3. Chihiro

    Chihiro Excel Ninja

    Messages:
    5,242
    Similar concept, using different property to loop.
    Code (vb):
    Sub Demo()
    Dim vRow As Range
    Dim i As Long: i = 0
    With Worksheets("Sheet1")
        For Each vRow In .AutoFilter.Range.SpecialCells(xlCellTypeVisible).Rows
            If i = 10 Then
                vRow.Select
                Exit Sub
            End If
            i = i + 1
        Next
        If i < 10 Then
            MsgBox "There is less than 10 visible rows in range"
        End If
    End With
    End Sub
  4. chand1230

    chand1230 New Member

    Messages:
    12
    Thanks Vletm,

    Great Job exactly what I wanted.
  5. chand1230

    chand1230 New Member

    Messages:
    12

    Thanks a lot Chihiro

    It works like a charm.

Share This Page