Copy macro to other row

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
 
B

Bob Phillips

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)
 
S

sybmathics

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
 
Top