+ Reply to Thread
Results 1 to 14 of 14

Hide worksheets depending on values in master sheet

  1. #1
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Hide worksheets depending on values in master sheet

    Problem: I have a file with 11 worksheets. In Sheet1 I have 10 rows. If cell A1 is "No" or "blank" I would like to hide "Sheet2", if cell A2 is "No" or "blank" I would like to hide "Sheet3" and so on. Solution?

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Hide worksheets depending on values in master sheet

    Use this-
    Please Login or Register  to view this content.
    Check attached.
    If you type anything except "No" the sheet will be unhided.
    Attached Files Attached Files
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide worksheets depending on values in master sheet

    May be
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    How to make the macro run when cell Changes in cell A1:A10?

  5. #5
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Hide worksheets depending on values in master sheet

    Now this would work automatically.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    Hm... now we moved input cells from A1 and down to D4 and down and macro does not work. How to change the macro? Is it possible to use defined names instead?

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide worksheets depending on values in master sheet

    Yes you can define your range name it for example "List" and try this
    Please Login or Register  to view this content.

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Hide worksheets depending on values in master sheet

    Right click on Master Sheet >>view code>>put this code there-

    Please Login or Register  to view this content.
    Check attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    YasserKhali, thanks! Your solution works excellent! How to make it run automatic?

  10. #10
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    YasserKhali, thanks! Your solution works excellent! How to make it run automatic? (when cell Changes)

  11. #11
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    YasserKhali, thanks! Your solution works excellent! How to make it run automatic? (when cell Changes - in List-area)

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide worksheets depending on values in master sheet

    Hi
    Just right Click sheet1 tab then view code and paste this code
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    02-27-2012
    Location
    Uddevalla, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Hide worksheets depending on values in master sheet

    THANKS A LOT!!! Perfect.

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide worksheets depending on values in master sheet

    You're welcome
    Glad I can help
    Thanks for the feedback and for the rep points

+ 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. Replies: 1
    Last Post: 05-20-2015, 09:52 PM
  2. Hide rows & Dropdowns depending on a Master-Dropdown List (choose between 1 and 10)
    By chrisignm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2014, 07:26 PM
  3. [SOLVED] Sorting data from a master sheet to multiple sheets depending on values in a given column
    By kodos10 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-30-2013, 05:46 AM
  4. Replies: 1
    Last Post: 05-15-2013, 09:51 PM
  5. Replies: 12
    Last Post: 09-22-2011, 11:11 PM
  6. Hide or unhide worksheets from cell values in sheet 1
    By glenin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-07-2011, 06:00 PM
  7. Copy values from multiple worksheets onto one master sheet
    By CGBatch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2007, 04:46 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