View Single Post
  #4   Report Post  
Posted to microsoft.public.word.tables
Martin ©¿©¬ @nohere.net Martin ©¿©¬ @nohere.net is offline
external usenet poster
 
Posts: 9
Default Need help to add up figures please


Thanks for your time & help Doug
I haven't a clue about macros, however I read an article about
ToolsCalculate at http://word.mvps.org/FAQs/General/ToolsCalculate.htm
which is doing the job for me
That's something else I've learnt today
--
Regards
Martin
©¿©¬

On Sun, 20 Apr 2008 08:29:24 +1000, "Doug Robbins - Word MVP"
wrote:
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