+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Hide Sheets using drop-down menu selection

  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Hide Sheets using drop-down menu selection

    I'm looking for a way to hide specific sheets based on the value in a specific cell. Here's what I want:

    Let's say I have 4 Sheets called Main, Sheet2, Sheet3, and Sheet4. On the sheet titled Main, I have a drop-down menu containing the choices A, B, and C in cell B1.
    If B1 on Main is blank, I want Sheets 2-4 to be hidden.
    If B1 on Main contains A (selected from the drop-down menu, not entered manually), I want Main, Sheet3, and Sheet4 to become hidden.
    If B1 on Main contains B (selected from the drop-down menu, not entered manually), I want Main, Sheet2, and Sheet4 to become hidden.
    If B1 on Main contains C (selected from the drop-down menu, not entered manually), I want Main, Sheet2, and Sheet3 to become hidden.

    I know it would be much simpler to use a macro and have to enter the value manually, but I'm willing to invest extra time to have it this way. Well, invest time and ask for help.

    If it's absolutely not possible, what would be the macro to have this happen when the value in B1 is entered manually? I've tried it myself but I can't seem to make it work. Even when the code doesn't return any errors, I've just made a useless string that doesn't do anything. I'm sure it's something stupid I'm leaving out. Ideas?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Hide Sheets using drop-down menu selection

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-18-2010
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Hide Sheets using drop-down menu selection

    Thank you for the reply. I have attached 4 documents.

    Template1 is what I want it to look like when B1 on Main is blank.
    Template2 is what I want it to look like when B1 on Main is A.
    Template3 is what I want it to look like when B1 on Main is B.
    Template4 is what I want it to look like when B1 on Main is C.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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