It appears to be the leading 5 which causes the error. The condition sees
this as a numeric field and ignores the rest. Ensuring that the data does
not start with a 5 seems to do the trick (at least with your quoted data).
Add a couple of spaces in the field construction e.g.
{ IF " { MERGEFIELD AHD_pgm_id }" = " 5x5 Team-AG" "Al Gianotti," "" }
This produces a true result only for a data field that contains - 5x5
Team-AG

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> From Rong
> statement is in Word 2003, letter document
[quoted text clipped - 35 lines]
>>> with Names.
>>> any help on either situation thanks Rong
Rong - 23 Apr 2005 18:58 GMT
Thanks for the tip
does not work on my machine.
I did that change to the Word form - no difference
I went to the excel data reformated the cell to 'text'
tried it left justified, no change
tried it right justufied, no change
changed the data to 'Team-AG 5x5' that failed the 5x5 test
(it seems that it only tests from the start of the field, no '*' type support)
Version of Word 2003 is 11.6359.6360 SP1
looks as if I have to seperate that field into 2 - then it seems to work.
any other thoughts?
> It appears to be the leading 5 which causes the error. The condition sees
> this as a numeric field and ignores the rest. Ensuring that the data does
[quoted text clipped - 45 lines]
> >>> with Names.
> >>> any help on either situation thanks Rong
Graham Mayor - 23 Apr 2005 19:16 GMT
My original tests (same Word version) used a Word table, but I have retested
with the data in an Excel table and it still works fine here as posted. I
have no other suggestions to offer.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Thanks for the tip
> does not work on my machine.
[quoted text clipped - 71 lines]
>>>>> replace with Names.
>>>>> any help on either situation thanks Rong
Ed Bloomfield - 28 Apr 2005 14:23 GMT
It seems the thing that is not working may be that Word only looks at the
first 3 or 4 characters in deciding whether there's a match between the
field content and the test variable content.
For example,
{ IF { MERGEFIELD Name1 } = "5x5 Smith" "george" "Vacant" }
using the following data for Name1
5x5 Hello
5x5 Smith
5x5 Abel
as the data, will result in george as the output for every record.
Therefore, I'd suggest you vary the 1st 3 or 4 characters in your test
variable so there will be a test rather than have the same characters in the
first 3 spaces of the field for every test variable, resulting in the answer
being the same for every variation of the test.
Ed Bloomfield
> My original tests (same Word version) used a Word table, but I have
> retested
[quoted text clipped - 76 lines]
>>>>>> replace with Names.
>>>>>> any help on either situation thanks Rong
Graham Mayor - 28 Apr 2005 15:07 GMT
Try it with the following (note the quotes and spaces)
{ IF " { MERGEFIELD Name1 }" = " 5x5 Smith" "George" "Vacant" }
If your premise that it only looks at the first 3 or 4 characters were true
then you would get George for every record.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> It seems the thing that is not working may be that Word only looks at
> the first 3 or 4 characters in deciding whether there's a match
[quoted text clipped - 110 lines]
>>>>>>> replace with Names.
>>>>>>> any help on either situation thanks Rong