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 / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Returning a formula from another table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jules - 18 Apr 2007 03:58 GMT
I have 2 tables in a document.  I have a macro that does a lot of adding,
subtracting etc. in each table.  I want to set up a formula in a cell in
table 1 that returns the result of adding 2 cells from table 2, (eg total of
adding cells C5 and D5 from Table 2 to show in cell H6 of Table 1) .  Is this
possible?

thank you
macropod - 18 Apr 2007 09:06 GMT
Hi Jules,

You can probably do all the maths with field coding. To see how to do this and how to reference cells in other tables using field
codes, check out my Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=365442
If you use such an approach, then the only code your macro would need to force a recalc is:
ActiveDocument.Fields.Update

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

>I have 2 tables in a document.  I have a macro that does a lot of adding,
> subtracting etc. in each table.  I want to set up a formula in a cell in
[quoted text clipped - 3 lines]
>
> thank you
Jules - 19 Apr 2007 00:52 GMT
Thanks, I found what I needed in the article and it will be good for future
reference

> I have 2 tables in a document.  I have a macro that does a lot of adding,
> subtracting etc. in each table.  I want to set up a formula in a cell in
[quoted text clipped - 3 lines]
>
> thank you  
 
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.