Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel course tate modern - macro to change column

Forum 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

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Difference between Two Dates

The DATEDIF function computes the difference between two dates. The DATEDIF function is as follows:

=DATEDIF (Date1,Date2,Interval)

Please note that Date1 must be less than (earlier) or equal to Date2

Please note that Interval must be one of the following codes: "d" (in days), "m" (in months), "y" (in years) expressed in quotes


View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.