Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
tddrover tddrover is offline
external usenet poster
 
Posts: 2
Default How do I subtract two merge fields then take that total and divide

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?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default How do I subtract two merge fields then take that total and divide

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.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"tddrover" wrote in message
...
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?


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I subtract two merge fields then take that total and divide

{ = ({ MERGEFIELD Original Debt } - { MERGEFIELD Paid to Date }) / 2 \#
"$,0.00" }

You must use Ctrl+F9 for each pair of Field Delimiters { }

--
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

"tddrover" wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
tddrover tddrover is offline
external usenet poster
 
Posts: 2
Default How do I subtract two merge fields then take that total and divide

Thank you very much!! Worked great.

"tddrover" wrote:

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?

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtract formula Candace Tables 6 April 21st 23 01:10 PM
WHAT HAPPENED TO THE FORMULAS/ADD AND SUBTRACT Vero Microsoft Word Help 4 August 30th 07 12:28 PM
how do you write the subtract sign scuba phill Microsoft Word Help 4 May 10th 05 02:47 PM
total yes and no text fields gh Microsoft Word Help 1 February 17th 05 12:57 AM
Formula in table - Creating a final total from sub-total cells Anne Gilmour Tables 1 November 7th 04 04:14 AM


All times are GMT +1. The time now is 11:38 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"