View Single Post
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Word 2000 Mailmerge - Display Field if two criteria met

Oops! Try:
{IF{={IF{MERGEFIELD Criteria1}= x 1 0}*{IF{MERGEFIELD Criteria1}= y 1 0}}= 1 "True Output" "False Output"}

--
Cheers
macropod
[MVP - Microsoft Word]


"macropod" wrote in message ...
HI JoePineapples,

Here's another way of approaching the problem, assuming your criteria are mergefields:
{IF{={IF{MERGEFIELD Criteria1}= x 1 0}*{IF{MERGEFIELD Criteria1}= y 1 0}= 1 "True Output" False Output"}
The same technique works with other REF fields, etc., also.

FWIW you can keep expanding this with more expressions like '*{IF{MERGEFIELD Criteria1}= x 1 0}' if necessary. Also,.if you wanted
to convert this to an OR test, you could simply replace the '*' with '+' and change the '= 1' to ' 0'.

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.

--
Cheers
macropod
[MVP - Microsoft Word]


"JoePineapples" wrote in message
...
Hi All

I can use the IF function for one criteria but is it possible to have two
criteria.

eg.

IF {Criteria1} = x AND {Criteria2} = y THEN Show Field

Any help would be much appreciated.