VBE - List Macro (Hide/Unhide rows)

Tingle

New Member
Joined
Dec 21, 2016
Messages
47
Hi all,

Can anyone help me solve this problem... I have a drop down list with 'Yes & No' as the options. By selecting 'Yes' it can either hide or unhide certain rows on the the same sheet. Same for selecting No.

A simple 'Record Macro' does not work.

Will the same formula work for a list with 8 options on the list?

Thanks in advance.

Tingle
 
Can anyone help me with above?
Patience, my friend!
Please realize that most of us aren't online 24 hours a day!

Anyway, it looks like S_Wish modified your code for you.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Thank you for your help, I tired the above code and was given a compile error. Else without If? What could that be?
 
Last edited:
Upvote 0
Their "Else" statements should actually be "Case Else".
 
Upvote 0
One last thing if anyone can help me...

If I have a list of 10 items (type 1 - type 10) in cell C13. I would like row 21 to unhide when the user selects either Type 2, Type 3, Type 6 or if the user enters their own input (not on the list).

I'm assuming it will be a similar code but with an additional "No selection" aspect?

Thanks in advance :)
 
Upvote 0
I'm assuming it will be a similar code but with an additional "No selection" aspect?
You can use that "Case Else" clause to handle anything that is not one of your pre-determined selections.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top