A
Andy
I have a =sum that needs to be inserted one cell above the range (number of
rows will vary but always in column "E"). The code below inserts the code
one cell below the range but I'm not having any luck figuring out how to
change it so that it inserts it one cell above. Any ideas?
1
2
3
4
-10-
but I require
-10-
1
2
3
4
Worksheets("SecondSheet").Cells(Cells(Rows.Count, 1).End(xlUp).Row,
5).Select
x = Range(ActiveCell, ActiveCell.End(xlDown)).Count
ActiveCell.End(xlDown).Offset(1, 0).FormulaR1C1 = "=sum(R[-" & x &
"]C:R[-1]C)"
rows will vary but always in column "E"). The code below inserts the code
one cell below the range but I'm not having any luck figuring out how to
change it so that it inserts it one cell above. Any ideas?
1
2
3
4
-10-
but I require
-10-
1
2
3
4
Worksheets("SecondSheet").Cells(Cells(Rows.Count, 1).End(xlUp).Row,
5).Select
x = Range(ActiveCell, ActiveCell.End(xlDown)).Count
ActiveCell.End(xlDown).Offset(1, 0).FormulaR1C1 = "=sum(R[-" & x &
"]C:R[-1]C)"