I want to take my two merge field and divide them by 50% or by two. I can
get the subtracting part but it does not want to divide. I tried {total =
{Mergefield Original Debt} - {Mergefield Paid to Date} / 2} this will only
give me the subtraction but not the division part. Also I want the answer to
read in a dollar format instead of decimal format. Can anyone help?
Herb Tyson [MVP] - 17 Aug 2007 04:16 GMT
Use parentheses so that Word knows to divide the difference:
{ = ({Mergefield Original Debt} - {Mergefield Paid to Date}) / 2}
As shown in your example (not sure why "total" is there -- it should not be,
and it's likely changing the result), it's doing the following:
OriginalDebt - (PaidToDate/2)
That's because multiplication is evaluated before subtraction. By grouping
using parentheses, you can control how the expression is evaluated.

Signature
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
>I want to take my two merge field and divide them by 50% or by two. I can
> get the subtracting part but it does not want to divide. I tried {total =
[quoted text clipped - 3 lines]
> to
> read in a dollar format instead of decimal format. Can anyone help?
Doug Robbins - Word MVP - 17 Aug 2007 04:18 GMT
{ = ({ MERGEFIELD Original Debt } - { MERGEFIELD Paid to Date }) / 2 \#
"$,0.00" }
You must use Ctrl+F9 for each pair of Field Delimiters { }

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
>I want to take my two merge field and divide them by 50% or by two. I can
> get the subtracting part but it does not want to divide. I tried {total =
[quoted text clipped - 3 lines]
> to
> read in a dollar format instead of decimal format. Can anyone help?
tddrover - 17 Aug 2007 15:08 GMT
Thank you very much!! Worked great.
> I want to take my two merge field and divide them by 50% or by two. I can
> get the subtracting part but it does not want to divide. I tried {total =
> {Mergefield Original Debt} - {Mergefield Paid to Date} / 2} this will only
> give me the subtraction but not the division part. Also I want the answer to
> read in a dollar format instead of decimal format. Can anyone help?