Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have an averaging macro working with the following line in it: ActiveCell.FormulaR1C1 = "=AVERAGE(RC[-1]:R[9]C[-1])" the line averages 10 rows of data in the same column. What I want to do is change the "9" to a variable that I use elsewhere in the macro (boxsize) so that the number of averaged cells changes automatically. But when I substitute the variable (boxsize, which = 9) into the line above, I get an error. Could someone please tell me why it doesn't work and what can I do to fix it. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a variable in the Range function | Excel Worksheet Functions | |||
how can i use countif function inside a filtered range | New Users to Excel | |||
How to know if a variable has been reset inside other function | Excel Programming | |||
Variable range in MAX-function | Excel Worksheet Functions | |||
Using a range variable inside a excel function | Excel Discussion (Misc queries) |