+ Reply to Thread
Results 1 to 4 of 4

results of filtered range to hide/unhide rows in same wrksheet, outside the filtered range

  1. #1
    Registered User
    Join Date
    01-12-2017
    Location
    Seattle, WA
    MS-Off Ver
    2010
    Posts
    15

    results of filtered range to hide/unhide rows in same wrksheet, outside the filtered range

    Hello there, I am hoping someone can guide me in building a VBA code (excel 2010) that will, based on the visible results after a filter has been applied to a range, hide rows below and outside of the filtered range.

    I have 3 distinct ranges in an excel worksheet that all share common information in the first column, but information in all other columns is completely different. One of the ranges is filtered so that the user of the spreadsheet can narrow down the information he/she sees. What I would like is for the other 2, non-filtered ranges, to mimic the visible results of the filtered range. The point being to hide/unhide the information that is not related to the filtered results.

    I've attached the workbook here and noted in column A which ranges I am referring to. I've filtered the "source" range to see only seven of a possible nine items. The result I am hoping to achieve is that, since rows 34 & 35 are hidden because of the filter choices, that rows 21, 22, 59 & 60 would then be hidden as well and once the filter is removed, they would be unhidden.
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: results of filtered range to hide/unhide rows in same wrksheet, outside the filtered r

    Hi LuScannon

    Will the User ALWAYS be setting the Filter on Row 28 or might they set it on Row 15 or Row 53?
    You currently have 11 Lines in each Filter Range...will this EVER change?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    01-12-2017
    Location
    Seattle, WA
    MS-Off Ver
    2010
    Posts
    15
    Good question - yes, ALWAYS on row 15.

    I advertently found a work around but I am still very interested in how to do this via VBA.

    Quote Originally Posted by jaslake View Post
    Hi LuScannon

    Will the User ALWAYS be setting the Filter on Row 28 or might they set it on Row 15 or Row 53?
    You currently have 11 Lines in each Filter Range...will this EVER change?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: results of filtered range to hide/unhide rows in same wrksheet, outside the filtered r

    Hi LuScannon

    I assume you've discovered you can do this manually...
    I advertently found a work around...
    This Code in the attached accomplishes similar. Please note the three Named Ranges I've created...
    Package15_25
    Package28_38
    Package53_63

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Range of Rows filtered by column data
    By vagofone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2016, 01:20 PM
  2. [SOLVED] looping in filtered range by rows
    By HarryKlein in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-16-2016, 09:19 AM
  3. [SOLVED] Count of visible rows in a filtered range
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2014, 01:17 PM
  4. [SOLVED] Excel VBA - Issue in Naming Filtered Range on a Filtered List.
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 01:17 PM
  5. Count rows of a filtered range
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2013, 06:30 AM
  6. [SOLVED] Copy first 4 rows of filtered range
    By Charles in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-22-2012, 03:02 PM
  7. Define a range containing the first 10 rows of a filtered list
    By Marco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2005, 09:05 AM

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