danielstone121
New Member
- Joined
- Feb 14, 2013
- Messages
- 45
Hey guys-
I want to be able to hide and show every other column on a sheet (B, D, F, H, J, L, N, P, R, T, V, X, ect.) but only within the range that I am currently viewing. In other words, let's say I click the "Show" macro that will show every other column, from A to the end of the sheet. But I only want to see the columns from the "every other" macro that are ALSO within the current viewing window. Meaning, I only would want to see columns B, D, F, H, J, L, N, and P, since those are the columns that meet the "every other" criteria AND fall within the current, visible window.
[TABLE="class: cms_table, width: 800"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I apologize if I'm being confusing. I guess I am wondering if I can restrict a macro that is set to run on the entire sheet to only actually run on a specific range. Or, perhaps another way of asking. Let's say I have two control boxes: one for "Hide every other column" and one for "Show all columns". Is there a way to make it so that if the "Hide every other column" box is clicked, all other macros will run the "Hide every other column" first?
I want to be able to hide and show every other column on a sheet (B, D, F, H, J, L, N, P, R, T, V, X, ect.) but only within the range that I am currently viewing. In other words, let's say I click the "Show" macro that will show every other column, from A to the end of the sheet. But I only want to see the columns from the "every other" macro that are ALSO within the current viewing window. Meaning, I only would want to see columns B, D, F, H, J, L, N, and P, since those are the columns that meet the "every other" criteria AND fall within the current, visible window.
[TABLE="class: cms_table, width: 800"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I apologize if I'm being confusing. I guess I am wondering if I can restrict a macro that is set to run on the entire sheet to only actually run on a specific range. Or, perhaps another way of asking. Let's say I have two control boxes: one for "Hide every other column" and one for "Show all columns". Is there a way to make it so that if the "Hide every other column" box is clicked, all other macros will run the "Hide every other column" first?