T
Tony
I have written the following code in VBA to sum the
relative range of cells above any current cell position:
ActiveCell.Offset(-1, 0).End(xlUp).Name = "TopOfRange"
ActiveCell.Offset(-1, 0).Name = "BottomOfRange"
ActiveCell.Formula = "=sum(TopOfRange:BottomOfRange)"
How can I copy this cell across the row (ie. 10 times) so
that the appropriate range above each cell position is
summed (ie. if the above formula appears in A10 which
sums A1:A9, then if the formula is copied to B10, it sums
B1:B9)?
Thanks in advance.
relative range of cells above any current cell position:
ActiveCell.Offset(-1, 0).End(xlUp).Name = "TopOfRange"
ActiveCell.Offset(-1, 0).Name = "BottomOfRange"
ActiveCell.Formula = "=sum(TopOfRange:BottomOfRange)"
How can I copy this cell across the row (ie. 10 times) so
that the appropriate range above each cell position is
summed (ie. if the above formula appears in A10 which
sums A1:A9, then if the formula is copied to B10, it sums
B1:B9)?
Thanks in advance.