largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
Hi,
I bet this is an easy question and as soon as someone answers I'll be kicking myself for not thinking about it...
but how can I just select every other (nth) column based on a selection?
So say I have data in columns A-G. I want to select the data block from A1-G100 and then run this macro so that it keeps just every other (or nth) column selected. So the process would be to highlight the data block, then run the macro and I would be left with the data block every other (nth) column selected so I could format all those cells the same way (column width adjustment so I can't use conditional formatting with =mod(),2).
To take it to another slightly more complicated step- I'd like to ultimately include a box that pops up and asks for how many columns I'd like in between.
So that I could select a data block, then hit a button for the macro, type in a 3 to indicate I want to select every 3rd column and then hit go, and then be left with excel having every 3rd column selected.
Any ideas?
Thanks.
I bet this is an easy question and as soon as someone answers I'll be kicking myself for not thinking about it...
but how can I just select every other (nth) column based on a selection?
So say I have data in columns A-G. I want to select the data block from A1-G100 and then run this macro so that it keeps just every other (or nth) column selected. So the process would be to highlight the data block, then run the macro and I would be left with the data block every other (nth) column selected so I could format all those cells the same way (column width adjustment so I can't use conditional formatting with =mod(),2).
To take it to another slightly more complicated step- I'd like to ultimately include a box that pops up and asks for how many columns I'd like in between.
So that I could select a data block, then hit a button for the macro, type in a 3 to indicate I want to select every 3rd column and then hit go, and then be left with excel having every 3rd column selected.
Any ideas?
Thanks.