I have a worksheet that acts as a Table of Contents, called "TOC".
There are dozens of worksheets behind it, which all have an identical format set of headers rows. One of those cells, cell B6, which contains a drop down lists of category, so that I can categorises each worksheet, like "Admin" , "Finance" etc.
I have created a script that dependant on the same dropdown list but this time in cell E3 on the "TOC" worksheet, shows only those worksheets that are of a certain category, for example "Admin". However the IF statements are hard coded in VBA as is the drop down lists, using the Data Validation functionality and a Range which lists the categories, called "Categories". It becomes cumbersome when I want to add a new category mainly because I have to add another IF statement.
I would like to update it so that the "worksheet hide script" can then work dynamically against the selection in cell E3 on the "TOC" worksheet.
There are dozens of worksheets behind it, which all have an identical format set of headers rows. One of those cells, cell B6, which contains a drop down lists of category, so that I can categorises each worksheet, like "Admin" , "Finance" etc.
I have created a script that dependant on the same dropdown list but this time in cell E3 on the "TOC" worksheet, shows only those worksheets that are of a certain category, for example "Admin". However the IF statements are hard coded in VBA as is the drop down lists, using the Data Validation functionality and a Range which lists the categories, called "Categories". It becomes cumbersome when I want to add a new category mainly because I have to add another IF statement.
I would like to update it so that the "worksheet hide script" can then work dynamically against the selection in cell E3 on the "TOC" worksheet.