How To Sum
LastCol = Cells(2, Columns.Count).End(xlToLeft).Column
Cells(2, LastCol + 1).FormulaR1C1 = "=SUM(R2C1:R2C" & LastCol & ")"
(and I remembered to offset the cell this time <g)
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"hon123456" wrote in message
ps.com...
Thanks for you all,
My another question is how can I sum the result
horizontally?
Thanks
|