Copy macro to other row

  • Thread starter Thread starter togge
  • Start date Start date
T

togge

Hi all,

I've created two macron that executes calculations on a certain row.
Can I copy these macros so that they can execute the same calculations
but on a another row i.e. only on one row at the time leaving the
others unaffected.

Regards
Dan
 
Why copy them, why not pass the row number as an argument?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Looks like you recorded the macro using absolute references.

What you could try is to record the same macro again, but then use relative
references.
Record a new macro and before you do anything else click on on the second
button of the "recording" toolbar.
The relative reference means that from B1 clicking in A1 you don't exactly
click in A1 but in one column to the left.

Do what you want the macro to do and then stop the recording.

Next, run the macro from a different starting position.

You'll notice the difference.

Hope this helps.


greetings,


Sybolt
 

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