I finally figured out how to get a marco to hide/unhide columns based on a drop down list and using an IF(or)
statement in some cells (see this post: Link to other thread)
Here's the code for it:
'To hide columns with no data in row 2
Application.ScreenUpdating = False
Dim col As Range
For Each col In .Range("E2:FH2").Columns
col.EntireColumn.Hidden = _
Application.Sum(col) = 0
Application.ScreenUpdating = True
So when the user selects a market from the drop down list and runs this macro, the macro only shows the market they chose.
However this isn't done automatically.
Is there a way to make the macro run anytime there is something different
selected in the drop down list?
If it helps, the list for the drop down has all, market 1, market 2, etc etc. So
when the user selects market 1 the marco should run automatically and only show market 1. Then when they select all it would
run automatically again and show all markets.
Currently the marco works as it should, just not automatically (i'm
currently using a shortcut key).
Thanks for any help.