+ Reply to Thread
Results 1 to 2 of 2

Set activeCell to first row of filtered data

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-09-2009
    Location
    Cedar Hill, Tx
    MS-Off Ver
    Excel 2003
    Posts
    200

    Set activeCell to first row of filtered data

    Howdy, folks:

    It's time for my dumb-question of the day.

    I have a list of data - somw 6000 rows. I set a filter on that data and get the records required. I want to move the activeCell to the first record that's shown. Any ideas?

    Bob
    Last edited by bstubbs; 02-20-2013 at 02:03 PM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Set activeCell to first row of filtered data

    This should do it

    Sub Macro1()
        Dim rng As Range
        Set rng = Range("A2", Cells(Rows.Count, "A").End(xlUp)).SpecialCells(xlCellTypeVisible).Cells(1)
        MsgBox "The first visible cell is " & rng.Address
        rng.Select
    End Sub
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1