+ Reply to Thread
Results 1 to 6 of 6

Hide/Unhide Rows based on Criteria

  1. #1
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Hide/Unhide Rows based on Criteria

    Hi,
    I have a file is set up with a list of expenses down column A and different time periods in columns B to M. I want to display a consolidated report by hiding rows when there is a zero for a particular expense in all periods. I have a validation in column N that will show a "1" if that condition exists. I'd like to create a button that does this called "hide empty" and also a button that is called "show all" which will show all rows.
    Any guidance would be appreciated.
    Thanks,
    Phillycheese
    Last edited by Phillycheese5; 11-04-2010 at 02:05 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,008

    Re: Hide/Unhide Rows based on Criteria

    Ideally, you should post a sample workbook so that we can see what you want to do and what you are working with.

    If all the rows that meet the condition (all zero in period) have a 1 in the cell/column, you should be able to use AutoFilter to hide/unhide the rows.

    Record macros while you hide the rows and unhide the rows and then assign those macros to your command buttons.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: Hide/Unhide Rows based on Criteria

    TMShucks,
    Thanks for the response. I'm attaching the file I'm trying to test. Also, it's worth noting that in the actual file, the numbers that populate the expenses pull in from an external source and those numbers will change based on which division I run the report for (I'll be using this for about 20 different divisions). So the rows that get hidden will depend on the results.
    Hope this clarifies what I'm looking for.
    I appreciate the help,
    Phillycheese
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,008

    Re: Hide/Unhide Rows based on Criteria

    Sample workbook updated as described.

    Regards
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: Hide/Unhide Rows based on Criteria

    Works great, thank you.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,008

    Re: Hide/Unhide Rows based on Criteria

    You're welcome. Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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