Nested If Statements in Word 2007

A

Amy E. Baggott

Is there a way to nest If statements in Word or to use multiple conditions in
an IF statement? I have a cover letter that goes with an invoice, and I have
some conditional text that appears if the balance is negative. The three
possibilities are:

1. Balance is negative and date is <= the refund deadline, print "Refund to
follow"
2. Balance is negative and date is after the refund deadline, print "No
refund as deadline has passed."
3. Balance is 0 or positive, print nothing

Is there a way to do this in Word? Currently, I have an if statement based
on the balance, but I have to go in manually each year and change the letter
after the refund deadline, and I'd like it to be automatic.
 
M

macropod

Hi Amy,

Yes, you can nest IF statements - up to 20 levels if need be. Thus:
{IF{DATE \@ "YYYYMMDD"}> {DEADLINEDATE \@ "YYYYMMDD"} "No refund as deadline has passed." {IF{BALANCE}< 0 "Refund to follow"}}

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. Also, be careful to preserve the spacing indicated around the various expressions, otherwise you may run
into problems.
 

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