#1   Report Post  
Steve
 
Posts: n/a
Default Help! Nested IF

Hello,

I have been trying all day to figure this one out and I can't get it
to work. I have three nested IF fields. The way I wrote it only the
first two conditions seem to work properly it does not see the third.
Here is what I have.

{IF {REF "teight"} ="CPI Rent" {INCLUDETEXT
"c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP without 5yrs"
{INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP with
5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{INCLUDETEXT
"c:\\template\\17.01B.doc"}}}}

Only the first two conditions CPI Rent and %GRP without 5yrs work the
third %GRP with 5yrs returns with the 17.01B when it should be 17.01A.

I have 5 items in my dropdown box.

What am i doing wrong?

Thanks

Steve
  #2   Report Post  
macropod
 
Posts: n/a
Default

Hi Steve,

Your problem is that the spacing between the various expressions isn't
right. For example, after applying the IF tests, between the '=' and the
true results or between the true and false results. Consequently, you'll
only ever get the true result.

Try:
{IF{teight}= "CPI Rent" {INCLUDETEXT "c:\\template\\17.01A.doc"}
{IF{teight}= "%GRP without 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}
{IF{teight}= " %GRP with 5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}
{INCLUDETEXT "c:\\template\\17.01B.doc"}}}}

Cheers


"Steve" wrote in message
om...
Hello,

I have been trying all day to figure this one out and I can't get it
to work. I have three nested IF fields. The way I wrote it only the
first two conditions seem to work properly it does not see the third.
Here is what I have.

{IF {REF "teight"} ="CPI Rent" {INCLUDETEXT
"c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP without 5yrs"
{INCLUDETEXT "c:\\template\\17.01A.doc"}{IF {REF "teight"} ="%GRP with
5yrs" {INCLUDETEXT "c:\\template\\17.01A.doc"}{INCLUDETEXT
"c:\\template\\17.01B.doc"}}}}

Only the first two conditions CPI Rent and %GRP without 5yrs work the
third %GRP with 5yrs returns with the 17.01B when it should be 17.01A.

I have 5 items in my dropdown box.

What am i doing wrong?

Thanks

Steve



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
Help with nested tables Anasazi Tables 2 March 18th 05 04:42 AM
How do I "un-nest" a table from nested tables? Triplecee Tables 1 March 16th 05 02:19 PM
Nested If vobonyo Mailmerge 2 March 11th 05 06:11 PM
# Range inside "Nested If" Statement CJ Mailmerge 2 December 29th 04 07:56 PM


All times are GMT +1. The time now is 01:48 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"