Hi
I have a dashboard with a bunch of dynamic validation dropdown lists that allow the user to refine data shown on the main report sheet. This controls the filtering of rows and columns.
One of the filters is the 'ProNumber' and controls which columns to show. At the moment this works fine for one value but I want to do this for multiple values/columns.
I have the values saved in a named range, the dashboard cell [Sheets("Highlight Report").Range("O3"] pulls the value through a data validation list and upon clicking the 'apply filters' command button the following code executes.
Dim ProNumber as Variant
ProNumber = Sheets("Highlight Report").Range("O3").Value
Range("L:BJ").EntireColumn.Hidden = False 'show all columns
If IsEmpty(ProNumber) = False Then 'if cell contains a value
Dim c As Range
For Each c In Range("L2:BH2").Cells 'check column headers for value
If c.Value <> ProNumber Then 'if the value isn't found
c.EntireColumn.Hidden = True 'hide the column
End If
Next c
End If
How can I achieve this? I'm thinking it will need to be a ListBox but never used one before and even if I get it to produce a comma separated list I'm not sure how to encorporate this into my code above.
Any ideas? Cheers
Bookmarks