Hi all,
I would like to make a worksheet change macro that hides rows and columns based on cell values for a planning tool.
In columns B:BA, there are the week numbers 1 - 52. In rows 3:200, there are tasks. Names of tasks are in A3:A200.
In words, it would be something like this:
If there is any value in any of the tasks in weeks 10 through 14 (corresponding with range J3:N200, 10 to be entered in cells BB1, 14 in BB2), don't hide those rows, but hide all other rows in range 10:200. Also hide columns A:I and O:AZ. If BB1 or BB2 are empty, show all rows and columns.
Extra thing: I also would like it to be possible to enter weeks covering the year change, like week 48 until week 4, and thus hide weeks 5 through 47.
I've tried glueing together macros that I've found, but it's out of my league.
Any help is greatly appreciated!
Thanks,
Elmacay
I would like to make a worksheet change macro that hides rows and columns based on cell values for a planning tool.
In columns B:BA, there are the week numbers 1 - 52. In rows 3:200, there are tasks. Names of tasks are in A3:A200.
In words, it would be something like this:
If there is any value in any of the tasks in weeks 10 through 14 (corresponding with range J3:N200, 10 to be entered in cells BB1, 14 in BB2), don't hide those rows, but hide all other rows in range 10:200. Also hide columns A:I and O:AZ. If BB1 or BB2 are empty, show all rows and columns.
Extra thing: I also would like it to be possible to enter weeks covering the year change, like week 48 until week 4, and thus hide weeks 5 through 47.
I've tried glueing together macros that I've found, but it's out of my league.
Any help is greatly appreciated!
Thanks,
Elmacay