calculations in nested if statements

T

Tom

Hi I am using word 2007. I have a mail merge in which I am using nested if
statements . I want to assign a customer discount for the balance based on
the city of residency. For example, If they live in Akron , I want the bill
reduced by 10%. If they live in Cleveland I want the bill to be reduced by
12% and so on.

I have a field called TotalAccountBalance that is being passed back to word
from an access database calculated query. I tried {if{city}="Akron"
"{TotalAccountBalance}-{Total Account Balance *.10}" and so forth. I believe
this can be done. Can anyone help? Thanks

Tom
 
M

macropod

Hi Tom,

Try:
«TotalAccountBalance»*{=1-{IF«City»= "Akron" 0.1 0}-{IF«City»= "Cleveland" 0.12 0}-{IF«City»= "Portland" 0.08 0}}

Be careful to preserve the spaces indicated in the field code.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message. Likwise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields,
which you insert from the mailmerge toolbar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top