I've been asked to make a macro to do the following.
1st . . . The screen has a freeze pane set at J12 . The activecell can be anyplace on the worksheet. At the beginning of the macro, I will either move the activecell to column I on the same row, or select the entire row.
2nd . . . As an example, the operator makes an entry of 5 into cell I 9. This number represents the number of columns, to the right of column I, that need to be moved to the left.
3rd . . . When the macro is activated, column O would then be located next to column I . I do not want this to be done by hiding columns J through N.
4th . . . I've tried to write a macro that would do this move but no luck yet. I can move to any particular cell, but naturally, I don't know how to change the code according to the number in I 9 .
Then,
The 2nd time the macro is activated, I want all the columns to be re-displayed.
The next time the macro is activated, the first procedure would be run again. If the operator had changed the # in I 9 to 23 , the column AG would be displayed immediately to the right of column I .
So to speak, it's to act like a toggle switch.
Well, I hope I've made my needs clear.
Bookmarks