+ Reply to Thread
Results 1 to 5 of 5

Hide rows based on value in one column

  1. #1
    Registered User
    Join Date
    03-09-2010
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Hide rows based on value in one column

    This is my first try at any code for Excel, so bear with me. It's probably not the best, but working fairly good.

    What I am going for is a toggle button to hide/unhide rows based on a number 0 or other integer in column A. Hidden if 0, not if anything else. The probably is that it is hiding rows where 0 is in columns other than A as long as there's a 0 in column A below that point. Here's the code:

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    03-09-2010
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Hide rows based on value in one column

    OK, I think I get what's going on. If the A column cell is blank it counts as 0. How can I exclude blank cells from hiding?

  3. #3
    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: Hide rows based on value in one column

    Hi jlspartz

    Try this
    Please Login or Register  to view this content.
    John
    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.

  4. #4
    Registered User
    Join Date
    03-09-2010
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Hide rows based on value in one column

    That works perfect. Thanks! I just tried something similar, but yours is shorter and cleaner. Thanks again.

  5. #5
    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: Hide rows based on value in one column

    Hi jlspartz

    Glad it worked for you. If your satisfied, please mark your thread as solved. Click on the scales if you feel it appropriate.

    John

+ 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