+ Reply to Thread
Results 1 to 2 of 2

VBA Code to select the first cell after applying Filter

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    81

    VBA Code to select the first cell after applying Filter

    I have a dynamic range A2:M10000
    A1:M1 being the headings. WHen i appy the filter using autofilter.criteria I want to select the first cell in column M that appears in the filtered range.

    Example if filtered range is
    A8:M8
    A22:M22
    ..

    in the above case i want to select M8 alone using VBA. When the filtered range changes i want the respective M clumn to be copied and pasted in the next work book.

    Thank you so much in advance

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: VBA Code to select the first cell after applying Filter

    Try , below Vrow will give you the first visible Row Number after filter
    Sub test ()
    Dim Vrow as integer

    VRow = ActiveSheet.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Cells(1, 1).Row

    end sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. vba code for copying data to cell and applying macro (drop down list)
    By Tamjeed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2014, 10:57 AM
  2. [SOLVED] VBA code to select today() onwards from filter
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-18-2014, 06:39 AM
  3. Replies: 4
    Last Post: 06-04-2013, 11:01 AM
  4. Change cell colour when applying filter
    By DanielPodo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2012, 09:32 AM
  5. VBA Code to select the values from a filter
    By vikas.bhandari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2007, 03:49 PM

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