How to make a macro containing a relative cell rather then a specific cell

Daintel

New Member
Joined
Jul 7, 2011
Messages
6
Hello

First-time user to this site so I apologise if I appear to be a little clumsy.;)

I am using Excel 2010 and trying out some macros.

How do I make a macro containing a relative cell rather then a specific cell.

ie: When recording a macro, I wanted the macro to move to the start of the row but got the following code: Range("I32").Select because I was in "I32" when registring the macro. I wanted the macro to go to A32 if I was in row 32 or A33 if I am in row 33 etc...

Looking forward to hearing from one of you.
Best regards
Patrick
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,225,156
Messages
6,183,244
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top