
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
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?
> Use the formula
>
[quoted text clipped - 27 lines]
> >
> > Thanks for any suggestions!
Graham Mayor - 26 Jan 2008 09:12 GMT
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" }

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> That makes sense, thank you. Now, what if each Merge field is itself
> determined by an if statement? Here's a simplified example ignoring
[quoted text clipped - 50 lines]
>>>
>>> Thanks for any suggestions!
Peter Jamieson - 30 Jan 2008 17:54 GMT
<<
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.

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> That makes sense, thank you. Now, what if each Merge field is itself
> determined by an if statement? Here's a simplified example ignoring
[quoted text clipped - 43 lines]
>> >
>> > Thanks for any suggestions!