+ Reply to Thread
Results 1 to 6 of 6

Show sheet based on cell value

  1. #1
    Registered User
    Join Date
    03-06-2012
    Location
    west coast Norway
    MS-Off Ver
    Office 365
    Posts
    55

    Show sheet based on cell value

    All,

    I have spent the day looking for a macro to help me, but every single one i found doesn't work in my sheet.

    I have a request sheet that wither will be a MR, MB or MT. Cell P4 in sheet3 has the following statement: =IF(Q4=2;"MR";IF(Q4=3;"MB";IF(Q4=4;"MT";"")))
    (it was not originally made by me, so there are many people who have made their mark on this over the years)

    So when cell P4 states "MB" i would like to unhide sheet8, else i want this sheet hidden.

    Any takers? Do i need to upload an example (i can't use the actual sheet as it is company procedures), is so it would take some time to create one...
    kind regards
    tigergutt

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Show sheet based on cell value

    Maybe:

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 11-24-2015 at 09:07 AM.

  3. #3
    Registered User
    Join Date
    03-06-2012
    Location
    west coast Norway
    MS-Off Ver
    Office 365
    Posts
    55

    Re: Show sheet based on cell value

    Thanks for your reply John,
    Do i need to activate anything, crate a button? Doesn't change my sheets unless i manually run the macro. is there a way for it to monitor cell P4?
    (for some reason (8) did not work, but is Ok now when renamed to sheet name)

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Show sheet based on cell value

    I don't think you can get it too monitor P4 (a formula) with event code. However based on your formula you can use this event code which monitors Q4 where the value that Generates "MB".

    Please Login or Register  to view this content.
    Sheets(8) is the index not the name. Same as Sheet8.

  5. #5
    Registered User
    Join Date
    03-06-2012
    Location
    west coast Norway
    MS-Off Ver
    Office 365
    Posts
    55

    Re: Show sheet based on cell value

    I appreciate your time John, I'm just not good enough with vba to get this running.

    I will just leave it and it will be visible (not a problem, just nice to have it hidden when not needed.)

    Cheers!

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Show sheet based on cell value

    On Sheet 3. Right click on the mouse > Select View Code. A dropdown will appear. Left side choose Worksheet. Right side choose Change. Copy and paste the code provided there.

+ 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: 2
    Last Post: 08-14-2014, 06:03 AM
  2. [SOLVED] vba codes to show sheet/tab based on data validation
    By albert28 in forum Excel General
    Replies: 3
    Last Post: 04-01-2014, 02:56 AM
  3. [SOLVED] Show/Hide Sheet 2 based on checkbox located on Sheet 1
    By stolen_83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 12:51 PM
  4. Only show data based on filtering from other sheet
    By D-smoke in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2012, 04:40 AM
  5. Show and Hide Label Controls based on cell on another sheet
    By muzunova in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2011, 02:07 PM
  6. show rows from other sheet based on criteria?
    By canadave in forum Excel General
    Replies: 4
    Last Post: 02-04-2011, 03:04 PM
  7. find value in sheet based on combobox and show in listbox
    By herukuncahyono in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2010, 05:43 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