98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » excel course tate modern - Macro To Change Column
excel course tate modern - Macro To Change Column
Resolved · Low Priority · Version Standard
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Printing spreadsheets without opening them firstHere's a fast way of printing a spreadsheet from Windows Explorer/My Computer. |