I'm trying to write a Macro that will hide columns based on a user input, and then rows based on what is left over.
Basically, when the workbook is opened, I want a box to pop up that says enter store number. Then the store number is
typed, and OK is pressed, and it will hide all columns in the range Z:IV that do not have that store number in row 1. There
will only and always be one column that will remain unhidden.
After that is done, I want to hide all rows in the
range 2:2000 that have a blank or 0 value in that column that was NOT hidden in the above step. This column will be dynamic
IE: If you enter store "101" in, all columns right of Y will hide except column AA (just an example),
which contains "101" in cell AA2. Then all rows that are blank or have a value of 0 in column AA will be hidden.
Then if you enter store "202" in, all columns right of column Y will hide except column BA this time, which contains "202"
in cell BA2. Then all rows that are blank or have a value of 0 in column BA will be hidden as well.
I would like
this to all happen in one macro. So when the store # is entered, everything is done and ready to view.
this is probably difficult, but if it makes it much easier, I guess I could deal with deleting rows and columns instead of
hiding. I would much rather hide, but if deleting is the only way, it is acceptable.
Thanks in advance.