Hi all, I hope you're all well.
I'm looking for a macro that would hide columns for two conditions:
For a defined range it would always hide every 3rd column, no matter the content. But it would also hide the two columns to the left of any 3rd column if the third column contains a cell = 0. Here's an example using dummy data:
So in this example, I want the macro to always hide the "Ties" columns (but in the original data I wouldnt have a consistent title like "ties" for the macro to use, it would have go by 3rd column starting at column B). And the macro should also hide columns E and F because column G contains two cells = 0 (In the original data, if any cell within range G3:G6 = 0, then all cells in range G3:G6 would be 0, so one could use a sum(G3:G6)=0 criterion if that'd be easier. One could also pick any row/cell within that range, e.g. G3, and check if it is 0.
Thanks a lot for any help!
Best
Tim
I'm looking for a macro that would hide columns for two conditions:
For a defined range it would always hide every 3rd column, no matter the content. But it would also hide the two columns to the left of any 3rd column if the third column contains a cell = 0. Here's an example using dummy data:
So in this example, I want the macro to always hide the "Ties" columns (but in the original data I wouldnt have a consistent title like "ties" for the macro to use, it would have go by 3rd column starting at column B). And the macro should also hide columns E and F because column G contains two cells = 0 (In the original data, if any cell within range G3:G6 = 0, then all cells in range G3:G6 would be 0, so one could use a sum(G3:G6)=0 criterion if that'd be easier. One could also pick any row/cell within that range, e.g. G3, and check if it is 0.
Thanks a lot for any help!
Best
Tim