ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide/unhide specific cells based on the dropdown list value (https://www.excelbanter.com/excel-programming/380698-hide-unhide-specific-cells-based-dropdown-list-value.html)

Sam Kuo

Hide/unhide specific cells based on the dropdown list value
 
Hi

I'd like to hide/unhide multiple cells when selecting a certain value in the
dropdown list. All cells are merged cells.

e.g. I have created a cell as a dropdown list containing "group A" and
"group B" using validation. I'd like to hide group B related cells when
"group A" is selected in the dropdown list; and vice-versa.

How can I do this? Any help would be appreciated.



Tom Ogilvy

Hide/unhide specific cells based on the dropdown list value
 
Assumed you have named the cells with names to match those in the dropdown
list

for a Data Validation dropdown in Cell A1

Activesheet.Rows.Hidden = False
Range(Range("A1").Value).EntireRow.Hidden = True

--
Regards,
Tom Ogilvy


"Sam Kuo" .(donotspam) wrote in message
...
Hi

I'd like to hide/unhide multiple cells when selecting a certain value in
the
dropdown list. All cells are merged cells.

e.g. I have created a cell as a dropdown list containing "group A" and
"group B" using validation. I'd like to hide group B related cells when
"group A" is selected in the dropdown list; and vice-versa.

How can I do this? Any help would be appreciated.






All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com