A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

if then else



 
 
Thread Tools Display Modes
  #1  
Old August 14th, 2004, 05:33 PM
Russ
external usenet poster
 
Posts: n/a
Default if then else

I am trying to use the "if then else" command in a mail merge. Howerver, I
want the command to be: if "field x" or "field y" is equal to "value" then
.... or ...

is this possible and how would i go about it?
thanks
--
Russ
  #2  
Old August 14th, 2004, 05:54 PM
Graham Mayor
external usenet poster
 
Posts: n/a
Default

The following construction should do the trick - in the example the result
for either being true is ResultA if neither is true ResultB

{IF{Mergefield X} = "value" "ResultA" "{IF {Mergefield Y} = "value"
"ResultA" "ResultB"}"}

Each pair of field boundaries is set with CTRL+F9

The syntax used here is:
IF x = "value" ResultA
IF not then
IF y = "value" ResultA
Otherwise ResultB

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Russ wrote:
I am trying to use the "if then else" command in a mail merge.
Howerver, I want the command to be: if "field x" or "field y" is
equal to "value" then ... or ...

is this possible and how would i go about it?
thanks



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.