View Single Post
  #5   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Need help to add up figures please

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
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

Martin ©¿©¬ @nohere.net wrote in message
...

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