Need help to add up figures please

M

Martin ©¿©¬

Hi
I have various groups of figures (example below) in column B of a word
table. I would like to total each group and put the total in column
C opposite the -------------
Could someone help me with a formula for this please that will include
blank spaces if there are any and a variable number of figures
Thank you
--
Martin
©¿©¬

21,693.00
1,473.00
6,240.00
146.85
----------

1,446.00
1,635.00
1,639.66
----------


3,360.00
1,470.00
1,313.00
4,725.00
1,365.00
20.00
105.00
735.00
----------

7,864.89
532.00
1,204.00
976.00
----------
339.00
387.34
293.75
---------

220.00
100.00
100.00
---------

3,595.89
808.17
2,000.90
684.86
136.20
------------

1,220.20
165.00
488.72
469.00
99.88
258.37
96.22
----------
 
D

Doug Robbins - Word MVP

Easiest way is to use a macro

Dim i As Long
Dim number As Range
Dim total As Double
total = 0
With ActiveDocument.Tables(1)
For i = 1 To .Rows.Count
Set number = .Cell(i, 2).Range
number.End = number.End - 1
If IsNumeric(number) Then
total = total + number
Else
.Cell(i, 3).Range.Text = Format(total, "#,###.00")
total = 0
End If
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Top