+ Reply to Thread
Results 1 to 6 of 6

Help with mass hiding of rows based on cell value

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Question Help with mass hiding of rows based on cell value

    I am faced with a situation where I need the option to hide many rows with a button. I am unsure how to write the code to trigger a macro that would scan a column and depending on the value detected in each row, that row would be hidden.

    IE: it scans Column D for a check-mark or dash. If Row 2 is a dash it is hidden, however if Row 3 is a check mark, it is not.
    Additionally, I am not clear on how to create a button that would activate this macro, although I'm sure it is the easy part.

    I have attached a dummy workbook for reference to clarify what I am asking help for.

    Any help would be greatly appreciated!

    Thank you
    Attached Files Attached Files
    Last edited by J-Fly; 07-16-2012 at 06:03 PM.

  2. #2
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: Help with mass hiding of rows based on cell value

    Try this.

    Please Login or Register  to view this content.
    Last edited by Xer2; 07-16-2012 at 06:21 PM. Reason: Fixed Code in spreadsheet
    Click on the * icon if this post has been helpful.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Help with mass hiding of rows based on cell value

    • Select column D
    • Select from the menu Data\Filter\Autofilter
    • This will put a dropdown list in cell D1
    • Select from the D1 dropdown list the check-mark character a

    This will hide all rows that are not check-marks.

    You can record these steps as a macro, or just leave it in AutoFilter mode and make selections from the dropdown list.

  4. #4
    Registered User
    Join Date
    06-25-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help with mass hiding of rows based on cell value

    This is great!
    Quick question though, how did you create that button? And, would there be a way to have a warning message appear before the button is activated? Maybe something that says "Are you sure?"



    Quote Originally Posted by Xer2 View Post
    Try this.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-25-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help with mass hiding of rows based on cell value

    Great thought but not exactly what I am looking for. Needs to be pretty much invisible to someone reading it except for the button.





    Quote Originally Posted by AlphaFrog View Post
    • Select column D
    • Select from the menu Data\Filter\Autofilter
    • This will put a dropdown list in cell D1
    • Select from the D1 dropdown list the check-mark character a

    This will hide all rows that are not check-marks.

    You can record these steps as a macro, or just leave it in AutoFilter mode and make selections from the dropdown list.

  6. #6
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: Help with mass hiding of rows based on cell value

    Change code to this:

    Please Login or Register  to view this content.
    This new workbook is updated.
    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)

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