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?
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
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks