+ Reply to Thread
Results 1 to 5 of 5

Hiding worksheets based on selection from drop down list

  1. #1
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    3

    Hiding worksheets based on selection from drop down list

    Hi folks!
    I am new to the forum and would really appreciate some help in working out where I am going wrong with the following:
    I have a drop down list on my 'Summary Sheet' with 4 options: Select, Low, Medium and High (the cell 'D13' holds these options. The list is data validated and is on the DATA spread sheet under the range named 'Levels'.
    What I am trying to do is when D13 shows 'Select" all the sheets remain, when D13 shows 'Low', the Moderate exposure audit and High Exposure Audit sheets disappear, then when D13 shows 'Moderate', the Low and High sheets disappear and when D13 shows 'High', the Low and Moderate sheets disappear. I managed to get the first part working but when I added in for the next sheets they all seemed to disappear and I couldn't get them back. The code I have in now, nothing happens: Can someone please help, it is driving me mad!
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If [D13] = "Low" Then
    Sheets("Low Exposure Audit").Visible = True
    Else
    Sheets("Moderate Exposure Audit").Visible = False
    Sheets("High Exposure Audit").Visible = False
    End If
    If [D13] = "Moderate" Then
    Sheets("Moderate Exposure Audit").Visible = True
    Else
    Sheets("Low Exposure Audit").Visible = False
    Sheets("High Exposure Audit").Visible = False
    End If
    If [D13] = "High" Then
    Sheets("High Exposure Audit").Visible = True
    Else
    Sheets("Moderate Exposure Audit").Visible = False
    Sheets("High Exposure Audit").Visible = False
    End If
    End If


    End Sub

  2. #2
    Registered User
    Join Date
    11-01-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    MS Office 2013
    Posts
    76

    Re: Hiding worksheets based on selection from drop down list

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    3

    Re: Hiding worksheets based on selection from drop down list

    Thanks I have just tried but nothing happened...

  4. #4
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Hiding worksheets based on selection from drop down list

    Code by Subverter seems to be working, you just need to paste it in sheet "Summary" code

  5. #5
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    3

    Talking Re: Hiding worksheets based on selection from drop down list

    Awesome, all working now. Thanks for your help.

+ 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. Hiding columns based on drop down list selection
    By acadzow in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2015, 01:29 AM
  2. [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
  3. Replies: 14
    Last Post: 08-10-2013, 04:07 PM
  4. Help hiding rows based on drop down selection
    By J-Fly in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 11-23-2012, 02:07 PM
  5. Hiding rows based on drop down selection of cell
    By J-Fly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2012, 01:37 PM
  6. Hiding Columns based on Drop Down list selection
    By forge13 in forum Excel General
    Replies: 5
    Last Post: 11-25-2011, 07:39 AM
  7. Hiding Rows based on Drop Down menu selection
    By smurph_27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2008, 08:36 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