+ Reply to Thread
Results 1 to 6 of 6

Macro command to select filtered rows only

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Macro command to select filtered rows only

    Hi
    I have a macro that filters a range of data.
    Is there a command that will highlight only the filtered data, and ignore the hidden (unfiltered) data?
    Thanks

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro command to select filtered rows only

    Once you filter the data, it will highlight the visible cells Only. Select all and highlight all. I am assuming you are using Excel's filter function

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Macro command to select filtered rows only

    I think the command I need is
    Please Login or Register  to view this content.
    , which seems to highlight only the visible cells.
    Thanks anyway.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro command to select filtered rows only

    You do not need the command either. If you filter the data, the default data are SpecialCells(xlCellTypeVisible)

  5. #5
    Registered User
    Join Date
    06-05-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Macro command to select filtered rows only

    Thanks, it only worked using the command. Anyway, all sorted thanks for your efforts.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro command to select filtered rows only

    For e,g

    AutoFilter 3, "2"
    filters field 3 by a criteria of 2.
    After this line, I do not need to specify the special cells. I just do what ever I want to do with out special cells.

+ 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. [SOLVED] Macro to select visible rows containg data in filtered list
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-15-2013, 01:22 PM
  2. Replies: 3
    Last Post: 04-11-2013, 04:13 AM
  3. Select filtered data using a macro
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-29-2012, 08:22 AM
  4. Replies: 1
    Last Post: 08-09-2010, 05:38 AM
  5. Using VBA to autofilter and paste over results - can't select only filtered rows.
    By Cornwell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2010, 11:33 AM

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