+ Reply to Thread
Results 1 to 5 of 5

Automatically hide/unhide rows based on column A value

  1. #1
    Registered User
    Join Date
    04-11-2017
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    9

    Automatically hide/unhide rows based on column A value

    Hello,

    I have a worksheet with multiple pull-down lists in Col A. The pull downs change values of the cells below in Column A to either "Skip" or some other value. I am looking to hide the rows with "Skip" in Column A, as well as the one row below the cells with value "Skip". I've got this to work on another sheet with columns of horizontally oriented data, but have gotten stuck with the data oriented vertically (in one column). I've been able to get the rows to hide, but they will not unhide when the cell value is no longer "Skip".

    Here's the code I've got running currently:

    Please Login or Register  to view this content.
    Here's a screen shot of my spreadsheet.

    Screen shot.jpg

    Thanks in advance.

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

    Re: Automatically hide/unhide rows based on column A value

    If the dropdown is hidden because you set it to Skip, how do you then change the dropdron so it doesn't say Skip? If it's hidden, you wouldn't be able to select anything in the dropdown.

    This does the same thing as your code. I don't know if it would solve your problem.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 04-13-2017 at 09:59 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    04-11-2017
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    9

    Re: Automatically hide/unhide rows based on column A value

    Thank you for trying to help me AlphaFrog, I didn't do a good job explaining my worksheet. The sheet is a series of Questions with a pull-down in the next row below where the user selects an answer to the question. The first question answer can lead to future questions being rendered moot, and thus "Skip" will appear in lieu of the question. Since the question is moot, I am also looking to hide the associated pull down. So while rows may be hidden, selecting a new answer to the first question can change their value back to a question. This is where I am stuck, I can't get them to unhide. I also haven't figured out how to hide the pull downs.

    Sorry for the confusion.

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

    Re: Automatically hide/unhide rows based on column A value

    At the start of the macro, unhide all rows...
    Rows("1:50").Hidden = False
    and then have the code loop through and hide the Skip rows.

    If you want to attach a workbook, I'll take a look.

  5. #5
    Registered User
    Join Date
    04-11-2017
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    9

    Re: Automatically hide/unhide rows based on column A value

    Thanks for all your help AlphaFrog, but I ended up transposing my data into row 1 and 2 to use code I already had working. I should've thought about this 15 hours ago. Here's what I'm running now and it's working.

    Please Login or Register  to view this content.
    Thanks again for your time.

+ 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. [SOLVED] Macro to unhide & hide rows based on column value
    By qvfr034 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-15-2020, 03:00 PM
  2. [SOLVED] Automatically hide and unhide rows based on selected month
    By dondonordas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2018, 02:07 AM
  3. How to automatically hide/unhide exact number of rows based on a cell's value
    By masud_jahan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-27-2016, 05:23 AM
  4. Automatically hide and unhide rows based on value in cell
    By kmham in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-28-2014, 12:03 PM
  5. [SOLVED] Macro to Automatically Hide/Unhide Rows Based on Checkbox
    By bga10s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2014, 07:32 PM
  6. [SOLVED] Macro to automatically hide or unhide rows based on either a value or no value in a cell
    By WFP111 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2013, 12:28 PM
  7. How Do I Hide/Unhide Rows in Excel based on a cell Value Automatically?
    By mgarcia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2012, 05:20 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