Running a macro in different cells [Solved/Closed]

- Nov 29, 2009 at 12:18 PM - Latest reply:  sd
- Apr 6, 2017 at 09:03 PM
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 

3 replies

0
Thank you
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
Posts
1865
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
- Nov 29, 2009 at 09:59 PM
-1
Thank you
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.