I have a worksheet that has 6 different drop down lists created with data validation. I would like to hide/unhide rows based on drop down selections. I know I can't have more than 1 worksheet change but all are independent of each other so I assume I need to combine together, I’m new to VBA and can’t figure out how to do it. Is this even possible? Is there another way I should be doing it?
For example, the drop down in D14 has 0 – 5 as the selection options. If 0 is selected then rows 15-80 are hidden, if 1 is selected then rows 15-28 are unhidden, 2 then rows 15-41 are unhidden, 3 then 15-54 are unhidden, 4 then 15-67 are unhidden, and if 5 is selected then none of these rows are hidden.
The VBA code is :
This works perfectly but my problem is I need to have other drop downs in the same worksheet act the same way. For example D81 drop down has a selection of 0-6. If 0 is selected then rows 82-88 are hidden, if 1 is selected then rows 82-83 are unhidden, etc.![]()
Please Login or Register to view this content.
Again, this works perfectly but only if the 1st code is not there.![]()
Please Login or Register to view this content.
I have additional hide/unhide instances on the worksheet as well. Some of the drop down lists are numbers and some are yes/no selections.
Thank you for any help you can give me.
Bookmarks