LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
GaryDK
 
Posts: n/a
Default

Hi Dave,

Assuming you have one row between your second description and section
total rows, this macro will do what you describe. Select the first
total cell and then run the macro.

Sub SumSection()
With ActiveCell
.FormulaR1C1 = "=SUM(R[-3]C:R[-2]C)"
.Copy Destination:=.Offset(0, 1).Resize(1, 3)
.Offset(1, -1).Select
Application.CutCopyMode = False
End With
End Sub

Also, if all your section totals have the label "Section Total", you
can have your Form Totals cells automatically update when you insert a
new section. With the following asumptions (just for this example):

1. Your form starts in column A, and the costing numbers are in B
thru E.
2. The Form Totals line is in row 20.
3. The Form Totals formulas encompass the rows in which you insert a
new section.

Then you can use this formula in the first Forms Total cell (and copy
it to the others):

=SUMIF($A$1:$A$19,"Section Total",B1:B19)

I hope this helps,

Gary

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Relative Indirect Formula Referencing? Damian Excel Worksheet Functions 1 January 7th 05 04:16 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"