PC Review


Reply
Thread Tools Rate Thread

Nested If Statements in Word 2007

 
 
Amy E. Baggott
Guest
Posts: n/a
 
      22nd Jul 2009
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.
--
Amy E. Baggott

"I''m going crazy and I''m taking all of you with me!" -- Linda Grayson
 
Reply With Quote
 
 
 
 
macropod
Guest
Posts: n/a
 
      23rd Jul 2009
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.
--
Cheers
macropod
[Microsoft MVP - Word]


"Amy E. Baggott" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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.
> --
> Amy E. Baggott
>
> "I''m going crazy and I''m taking all of you with me!" -- Linda Grayson


 
Reply With Quote
 
 
 
 
New Member
Join Date: Aug 2012
Posts: 3
 
      17th Aug 2012
Please can someone help me. I am trying to use if statements in word with no sucess.

I have an address block where address2 and address3 are sometime populated and sometimes not. So I want to say if address2 = " " then skip, If address3 " " then just display address2. If both address2 and address3 are not blank then display address2, address3. With a comma separating them.

This is what I have so far:
{if { MERGEFIELD ADDRESS3} = " " "{MERGEFIELD ADDRESS2}" "{MERGEFIELD ADDRESS2} {MERGEFIELD ADDRESS3}"}


I tried to add the comma:
{if { MERGEFIELD ADDRESS3} = " " "{MERGEFIELD ADDRESS2}" "{MERGEFIELD ADDRESS2}"","" {MERGEFIELD ADDRESS3}"}


But this doesn't work at all.



I haven't even got to the skip bit yet


Please can someone help


Thanks
Sarah
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Update Set Statements or Multiple DML Statements in one thedudeminds@msn.com Microsoft Access Queries 4 11th Sep 2007 06:34 PM
IF Statements (Mutliple Statements) =?Utf-8?B?RGVlemVs?= Microsoft Excel Worksheet Functions 3 19th Oct 2006 06:13 AM
if statements, and statements =?Utf-8?B?U3VtIExpbWl0IGFuZCBtYXJraW5n?= Microsoft Excel Worksheet Functions 3 29th Mar 2006 03:25 PM
operator statements, shorting when reusing one of the statements? KR Microsoft Excel Programming 1 4th Aug 2005 06:20 PM
IF statements/ AND Statements Suresh Nair Microsoft Excel Worksheet Functions 0 9th Aug 2003 09:19 AM


Features
 

Advertising
 

Newsgroups
 


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