Mekanto has attended:
No courses
Macro To Change Column
I need a macro the change the column selected with a cell reference. For example C3 to E3, Without changing the row.
For some reason macro's will not record when I press the arrow keys.
Thanks,
Mekanto
RE: Macro To Change Column
Hi Mekanto
The macro recorder only records the arrow movement if the Relative Reference button on the [Stop Recording[/b] toolbar is clicked.
Once its done if you move from C3 to E3, using the arrow, it will record the following code:
ActiveCell.Offset(0, 2).Range("A1").Select
NB This moves the cursor 2 columns to the right irrespective of the start point
If you require the cursor to always go to E3 then:
1. Record the macro without the Relative Reference button being selected
2. Select E3
The code is recorded as
Range("E3").Select
Hope this helps
Carlos