Auto Sum cell above a relevant reference cell
cLastRow = Cells(Rows.Count,activecell.column).End(xlUp).Row
Cells(cLastRow+1,Activecell.column).FormulaR1C1="= SUM(R1C:R" & clastrow
& "C)"
--
HTH
RP
(remove nothere from the email address if mailing direct)
"JJ" wrote in message
...
How can I sum all cells above a cell. For instance I have spreadsheets
with
varying numbers of rows, and I want to add a sum total at the bottom of
each
of those columns. Since the number of rows is unknown, I am unsure of what
to
put after the word "sum"....... Here is the code I have:
ActiveCell.SpecialCells(xlLastCell).Select
ActiveCell.Offset(1, -2).Select
ActiveCell.FormulaR1C1 = "=SUM(?????????)"
|