+ Reply to Thread
Results 1 to 6 of 6

Hide-Unhide rows on multiple worksheets based on value of a drop down list

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Hi All. First post so please bear with me! I have searched and tried various code but cannot find an answer that works.

    I have 30 worksheets. On sheet 1 I have a cell, A1 with a drop down list with 3 possible values, A, B or C.

    I want to hide or unhide rows 8:12 and 29:42 on sheets 2 through 20 depending on value in cell A1, sheet 1.

    e.g. Value in cell A1-Sheet 1 is A, then on sheets 2 to 20 rows 8:12 are hidden and 29:42 are unhidden.

    If value is B, then 8:12 are unhidden and 29:42 are hidden.

    If value is C then no rows are hidden.

    I need this to work every time the user changes the value in cell A1-Sheet

    Hope someone can help. I am very new to this so a hint as to where to put it as well would be helpful. Thanks in advance.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Hi,

    One way with the Sheet Change event for Sheet1
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Wow, that was quick! Thanks Richard. I will try this tomorrow and let you know how it works out.

  4. #4
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Sorry, where should I put this? Should I right click Sheet1 tab, View Code and paste it there?

  5. #5
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Worked great, thanks so much

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Hide-Unhide rows on multiple worksheets based on value of a drop down list

    Glad to be able to help.

    Just realised that the "st = ...." bit in the Case A & Case B statements is redundant. You could delete them.

+ 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] Hide/Unhide columns in multiple worksheets based on item chosen in a drop down list.
    By Gattaca2014 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-27-2014, 01:31 PM
  2. [SOLVED] hide or unhide rows based on text within a drop down list
    By souimet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 01:32 AM
  3. [SOLVED] How to hide & unhide rows based on selection from drop down box?
    By jgomez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2013, 08:30 PM
  4. Replies: 1
    Last Post: 02-01-2013, 03:06 PM
  5. Hide/unhide columns based on the drop down list value
    By vagif in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2012, 02:13 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