+ Reply to Thread
Results 1 to 8 of 8

Auto-hide/show Rows based on Yes/No Criteria

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Auto-hide/show Rows based on Yes/No Criteria

    Hi all,

    As stated in title, I would like to auto-hide/show certain rows based on Yes/No criteria which is selected by user via list. I know this cannot be completed with a formula but can be done so easily with a macro.

    There are many macros online that people have posted, but with absolutely 0 macro experience I was hoping for a bit more specific help. Attached is a spreadsheet with the format intended. User selects Yes or No in column C "Answer" column and as a result, it auto-hides/shows the rows in the table below it (Rows 19-46). I have also included in column E the specific rows to be hidden/shown based on user selection. If user selects "No", it should hide the rows. If "Yes", show the row.

    If you could provide some macro guidance and how i can implement this into the spreadsheet i would greatly appreciate it.

    Thanks in advance for your help - you guys have always come through for me.

    Jake

    MacroHelpPlease.xlsx

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Try this. It will automatically run each time you change a yes or no value

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Thanks for the response - where does it designate which specific Rows are hidden?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Auto-hide/show Rows based on Yes/No Criteria

    See if this does what you require.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Awesome John - works perfect!

    Quick question, how do I view the macro? I would like to see the logic for my own reference. When i press view Macros nothing appears in list?

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Glad it works for you. Right click on the Sheet Tab and select View Code.

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Quote Originally Posted by jakeruby View Post
    Thanks for the response - where does it designate which specific Rows are hidden?
    If you are talking to stnkynts, he very cleverly used the values you put into column E.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  8. #8
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Auto-hide/show Rows based on Yes/No Criteria

    Quote Originally Posted by jakeruby View Post
    Thanks for the response - where does it designate which specific Rows are hidden?
    As skywriter observed it utilizes the rows that you describe in column E. This way, in the future, you can quickly change the rows and the macro will hide/show your new indicated rows. Let me know if you have any other questions.

+ 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. Show Hide Rows based on cell value
    By Juicy2052 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2015, 07:55 AM
  2. [SOLVED] Macro to hide rows (Auto filter) based on multiple criteria
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2014, 07:36 AM
  3. Code to show/hide columns based on fixed criteria
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2013, 03:39 AM
  4. [SOLVED] Hide/Show rows based on the value in a cell
    By PatRiot199 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2012, 11:52 PM
  5. Show/Hide Specific set of Rows based on Criteria in one cell
    By mrgillus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-11-2010, 01:26 PM
  6. Hide / Show lines Based on Criteria
    By Rage in forum Excel General
    Replies: 7
    Last Post: 02-17-2010, 12:09 PM
  7. Auto Hide/Show Lines based on Data in cell
    By tariqnaz2005 in forum Excel General
    Replies: 5
    Last Post: 12-29-2009, 03:30 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