Thread: Tough one
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
jindon[_48_] jindon[_48_] is offline
external usenet poster
 
Posts: 1
Default Tough one


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