Running a macro in different cells

Solved/Closed
Rinat - Nov 29, 2009 at 12:18 PM
 Helmy - Sep 5, 2022 at 03:22 AM
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

2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Nov 29, 2009 at 09:59 PM
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.
1