have you tried the code?
Code:
--------------------
Sub test()
Dim r As Range
Set r = Columns("a").Find("Totals", , , xlWhole)
If Not r Is Nothing Then _
r.Offset(, 1).Resize(, 3).FormulaR1C1 = "=sum(r2c:r[-2]c)"
With Range("a2", Range("a" & Rows.Count).End(xlUp))
.Offset(, 3).FormulaR1C1 = "=sum(rc[-2]:rc[-1])"
End With
End Sub
--------------------
--
jindon
------------------------------------------------------------------------
jindon's Profile:
http://www.excelforum.com/member.php...o&userid=13135
View this thread:
http://www.excelforum.com/showthread...hreadid=540544