Report

Running a macro in different cells [Solved/Closed]

Ask a question Rinat - Last answered on Apr 6, 2017 at 09:03 PM by sd
Hello,
I have a question. I recorded a macro to average a series of columns, highlight the averages row in a bold color. I would now like to run the macro in seven different rows so I don't have to keep copying and pasting the formula etc. But everytime I run the macro, it runs it in the same row where I created the maco (i.e., row 32, instead of 48, then 64 etc) . How do I create a generic macro that is non-specific to the row number? Is that possible? There are other macros I would like to create that would generate the same problem, so I would very much appreciate help understanding how this works,
Thanks much,
Rinat
See more 
Helpful
+3
plus moins
When you star recording a macro right after you create the name a Stop recording toolbar appears, in it is a relative button, click it, make sure a border is around it, this will let you select a relative cell or a relative range of cells, all other procedures are the same.
I hope this helps
Helpful
+0
plus moins
If you want to do for all the required rows put the codes in a loop. If you want to do only in one or two rows put an input box.

post the code and modification can be suggested.

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!