How not to fixed cell address in Macros

  • Thread starter Thread starter Teak
  • Start date Start date
T

Teak

I used macro to record some steps.
When I run the macro, I got errors becos the cell address are hard-coded in
the macro.
what to do if I want the macro to do things like these, starting at the
active cell?

subtotal
move 2 cells left
type a text
insert a row
 
See the Excel/VBA/Beyond Excel's recorder page of my web site.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Business solutions leveraging technology
Microsoft Most Valuable Professional (MVP) 2000-2004
 
Teak

When recording the macro, first hit the "Relative Reference" button on the
Stop Recording Toolbar.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top