Insert Data from 1 Table to Another Table

Hi,

I have a Word Document with 2 Tables in it, and I use Fields within Both.

I want to use Table 1 to show the Totals from the Data in Table 2.

eg: In Table 2:

 -------------------

| Chocolate | £1.59 |

|-----------|-------|

| Cola      | £2.50 |

|-----------|-------|

| Gum       | £0.59 |

 -------------------

Table 1:

 ----------------

| Sweets | £2.18 |

|----------------|

| Drinks | £2.50 |

 ----------------

So I would like is a formula that will:

Add Table 2 B1 + Table 2 B3

Formula: {=T2:B1 + T2:B3 \# "£#,##0.00;(£#,##0.00)"}

Insert Table 2 B2

Formula: {T2:B2 \# "£#,##0.00;(£#,##0.00)"}

I am not sure how you reference Table 2 in the code for Table 1?

Please note that if possible I would like to do this within the Fields without using VBA, so when I change the amounts in Table 2 and then I do a Print Preview or Print the Page, then the Totals in Table 1 will be updated for me.

Thank you in advance,

Neil

Answer
Answer

In that case, format the -ve part of the switch red:

{ =SUM(BreakDownTable B2:B21) \# "£#,##0.00;(£#,##0.00)" }

It's that simple.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

See "Reference cells in another table" in this article.

FWIW, it is no longer necessary to simulate table format in these forums; if you click on the Create table icon on the toolbar, you can insert an actual table:

Chocolate £1.59
Cola £2.50
Gum  £0.59
Granted, it's a bit of a blunt instrument (table fills the form width, borders can't be removed), but it's sure easier than typing all those hyphens and pipes!
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 914 Applies to: