Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Tables / April 2008

Tip: Looking for answers? Try searching our database.

Need help to add up figures please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin ©¿©¬ @nohere.net - 19 Apr 2008 15:51 GMT
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
Signature

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

Martin ©¿©¬ @nohere.net - 19 Apr 2008 16:02 GMT
Sorry, I should have added I'm using Office Word 2003
Signature

Martin
©¿©¬

>Hi
>I have various groups of figures (example below) in column B of a word
[quoted text clipped - 3 lines]
>blank spaces if there are any and a variable number of figures
>Thank you
Doug Robbins - Word MVP - 19 Apr 2008 23:29 GMT
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

Signature

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

> Hi
> I have various groups of figures (example below) in column B of a word
[quoted text clipped - 3 lines]
> blank spaces if there are any and a variable number of figures
> Thank you
Martin ©¿©¬ @nohere.net - 20 Apr 2008 14:47 GMT
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
Signature

Regards
Martin
©¿©¬

>Easiest way is to use a macro
>
[quoted text clipped - 14 lines]
>    Next i
>End With
Doug Robbins - Word MVP - 20 Apr 2008 20:33 GMT
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/MacrosVBA/CreateAMacro.htm

Signature

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

> Thanks for your time & help Doug
> I haven't a clue about macros, however I read an article about
[quoted text clipped - 19 lines]
>>    Next i
>>End With
Martin ©¿©¬ @nohere.net - 22 Apr 2008 11:31 GMT
>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/MacrosVBA/CreateAMacro.htm

Thanks Doug, I got your macro up and running
However, it puts 0 or 00 in blank lines and it doesn't work on a
second page of the same document, but it does work if I copy the data
on the 2nd page to a new sheet ?
Signature

Martin
©¿©¬

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.