+ Reply to Thread
Results 1 to 2 of 2

Hiding/Unhiding Rows based on Multiple Drop Downs

  1. #1
    Registered User
    Join Date
    05-13-2019
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    1

    Hiding/Unhiding Rows based on Multiple Drop Downs

    Hi everyone!

    I currently have 5 separate drop downs in B2-B6 where possible answers are either Yes or No.
    If B2 = Yes then I want rows 9-136 to be unhidden.
    If B3 = Yes then rows 237-237 to be unhidden.
    If B4 = Yes then rows 238-292
    If B5 = Yes then rows 293-299
    If B6 = Yes then rows 301-307

    If the user changes their mind and says 'No' to any of these I need those rows to be hidden again.
    I have tried a few formulas including the below but it doesn't seem to work. Any ideas would be much appreciated. Thank you!

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Select Case True
    Case Target.Address = "$B$2"
    Range("9:136").Rows.Hidden = (Target.Value = "No")
    Case Target.Address = "$B$3"
    Range("137:237").Rows.Hidden = (Target.Value = "No")
    Case Target.Address = "$B$4"
    Range("238:292").Rows.Hidden = (Target.Value = "No")
    Case Target.Address = "$B$5"
    Range("293:299").Rows.Hidden = (Target.Value = "No")
    Case Target.Address = "$B$6"
    Range("301:307").Rows.Hidden = (Target.Value = "No")
    End Select

    End Sub

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Hiding/Unhiding Rows based on Multiple Drop Downs

    Try this:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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] Hiding and Unhiding rows based on their dates VBA
    By jecowher1 in forum Excel General
    Replies: 4
    Last Post: 10-15-2015, 07:24 PM
  2. Hiding and Unhiding rows based on their dates VBA
    By jecowher1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2015, 02:11 PM
  3. [SOLVED] hiding/unhiding rows based on a selection from a drop down
    By jenetic03 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2014, 10:49 AM
  4. Hiding and unhiding rows based on a CountA value
    By juliettelam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2014, 12:23 PM
  5. [SOLVED] Help hiding/unhiding rows based on multiple responses
    By mglitter1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2013, 07:11 PM
  6. [SOLVED] Help with hiding or unhiding multiple ranges of rows based on cell value on another sheet
    By Jake Bierly in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-22-2013, 12:14 PM
  7. Hiding Rows A & B- drop downs in other areas disappear
    By Dmaxin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-30-2013, 04:52 PM

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