Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I'm very familiar with Excel, but not very much with Word and its Merge fields.
I want to use a calculated value in several places, based on the contents of merge fields. Example: Subtotal: (Merge field A) Tax: (Merge field B) Shipping: (Merge field C) TOTAL: (SUM of all 3 fields) So, the question is whether I can have a cell where I can sum all 3 fields, and whether I can reference that "TOTAL" field in another few places in the document (rather than recalculating each time). Thanks for any suggestions! |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Use the formula
{ = { MERGEFIELD A } + { MERGEFIELD B } + { MERGEFIELD C } } You must use Ctrl+F9 to insert each pair of field delimiters { }, and you may also want to add a formatted switch. See "Formatting Word fields with switches" on fellow MVP Graham Mayor's website at http://www.gmayor.com/formatting_word_fields.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 "JAnderson" wrote in message news ![]() I'm very familiar with Excel, but not very much with Word and its Merge fields. I want to use a calculated value in several places, based on the contents of merge fields. Example: Subtotal: (Merge field A) Tax: (Merge field B) Shipping: (Merge field C) TOTAL: (SUM of all 3 fields) So, the question is whether I can have a cell where I can sum all 3 fields, and whether I can reference that "TOTAL" field in another few places in the document (rather than recalculating each time). Thanks for any suggestions! |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
That makes sense, thank you. Now, what if each Merge field is itself
determined by an if statement? Here's a simplified example ignoring formatting for now (also, is it required to end formatting switches with "\* MERGEFORMAT" or is that something Word puts in unnecessarily?): Subtotal: {if {MERGEFIELD A} = "Widget" "300.00" "150.00"} Tax: {if {MERGEFIELD B} = "Ohio" "20.00" "0.00"} Shipping: {if {MERGEFIELD C} = "Ohio" "20.00" "0.00"} TOTAL: ????? (Normally I would just nest all 3 of the above IF statements, but there must be a better way). Any ideas? "Doug Robbins - Word MVP" wrote: Use the formula { = { MERGEFIELD A } + { MERGEFIELD B } + { MERGEFIELD C } } You must use Ctrl+F9 to insert each pair of field delimiters { }, and you may also want to add a formatted switch. See "Formatting Word fields with switches" on fellow MVP Graham Mayor's website at http://www.gmayor.com/formatting_word_fields.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 "JAnderson" wrote in message news ![]() I'm very familiar with Excel, but not very much with Word and its Merge fields. I want to use a calculated value in several places, based on the contents of merge fields. Example: Subtotal: (Merge field A) Tax: (Merge field B) Shipping: (Merge field C) TOTAL: (SUM of all 3 fields) So, the question is whether I can have a cell where I can sum all 3 fields, and whether I can reference that "TOTAL" field in another few places in the document (rather than recalculating each time). Thanks for any suggestions! |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
How about
{ SET TA { if { MERGEFIELD A } = "Widget" "300.00" "150.00" } }{ SET TB { if { MERGEFIELD B } = "Ohio" "20.00" "0.00" } }{ SET TC { if { MERGEFIELD C } = "Ohio" "20.00" "0.00" } } Subtotal: { REF TA \# "$,0.00" } Tax: { REF TB \# "$,0.00" } Shipping: { REF TC \# "$,0.00" } TOTAL: { ={REF TA } + { REF TB } + { REF TC } \# "$,0.00" } -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org JAnderson wrote: That makes sense, thank you. Now, what if each Merge field is itself determined by an if statement? Here's a simplified example ignoring formatting for now (also, is it required to end formatting switches with "\* MERGEFORMAT" or is that something Word puts in unnecessarily?): Subtotal: {if {MERGEFIELD A} = "Widget" "300.00" "150.00"} Tax: {if {MERGEFIELD B} = "Ohio" "20.00" "0.00"} Shipping: {if {MERGEFIELD C} = "Ohio" "20.00" "0.00"} TOTAL: ????? (Normally I would just nest all 3 of the above IF statements, but there must be a better way). Any ideas? "Doug Robbins - Word MVP" wrote: Use the formula { = { MERGEFIELD A } + { MERGEFIELD B } + { MERGEFIELD C } } You must use Ctrl+F9 to insert each pair of field delimiters { }, and you may also want to add a formatted switch. See "Formatting Word fields with switches" on fellow MVP Graham Mayor's website at http://www.gmayor.com/formatting_word_fields.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 "JAnderson" wrote in message news ![]() I'm very familiar with Excel, but not very much with Word and its Merge fields. I want to use a calculated value in several places, based on the contents of merge fields. Example: Subtotal: (Merge field A) Tax: (Merge field B) Shipping: (Merge field C) TOTAL: (SUM of all 3 fields) So, the question is whether I can have a cell where I can sum all 3 fields, and whether I can reference that "TOTAL" field in another few places in the document (rather than recalculating each time). Thanks for any suggestions! |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]() also, is it required to end formatting switches with "\* MERGEFORMAT" No it isn't. or is that something Word puts in unnecessarily?): Yes, although I suspect MS thinks inserting it results in a better experience on average for most users and they may be right. -- Peter Jamieson http://tips.pjmsn.me.uk "JAnderson" wrote in message ... That makes sense, thank you. Now, what if each Merge field is itself determined by an if statement? Here's a simplified example ignoring formatting for now (also, is it required to end formatting switches with "\* MERGEFORMAT" or is that something Word puts in unnecessarily?): Subtotal: {if {MERGEFIELD A} = "Widget" "300.00" "150.00"} Tax: {if {MERGEFIELD B} = "Ohio" "20.00" "0.00"} Shipping: {if {MERGEFIELD C} = "Ohio" "20.00" "0.00"} TOTAL: ????? (Normally I would just nest all 3 of the above IF statements, but there must be a better way). Any ideas? "Doug Robbins - Word MVP" wrote: Use the formula { = { MERGEFIELD A } + { MERGEFIELD B } + { MERGEFIELD C } } You must use Ctrl+F9 to insert each pair of field delimiters { }, and you may also want to add a formatted switch. See "Formatting Word fields with switches" on fellow MVP Graham Mayor's website at http://www.gmayor.com/formatting_word_fields.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 "JAnderson" wrote in message news ![]() I'm very familiar with Excel, but not very much with Word and its Merge fields. I want to use a calculated value in several places, based on the contents of merge fields. Example: Subtotal: (Merge field A) Tax: (Merge field B) Shipping: (Merge field C) TOTAL: (SUM of all 3 fields) So, the question is whether I can have a cell where I can sum all 3 fields, and whether I can reference that "TOTAL" field in another few places in the document (rather than recalculating each time). Thanks for any suggestions! |
Reply |
Thread Tools | |
Display Modes | |
|
|