Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
jermsalerms79
 
Posts: n/a
Default IF / AND option?

is there a way to return text based on two fields.

IF field 1 = a
AND field 2 = 1
THEN result = x

IF field 1 = a
AND field 2 = 2
THEN result = y

IF field 1 = a
AND field 2 = 3
THEN result = z

IF field 1 = b
THEN result = BLANK

Is this possible.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Greg
 
Posts: n/a
Default IF / AND option?

Yes it is possible with nested conditional fields.


{ IF { F1 } = "A"{ IF { F2 }="1""X"{ IF { F2 } = "2" "Y"{ IF { F2 } =
"3" "Z"""}}}}

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
jermsalerms79
 
Posts: n/a
Default IF / AND option?

before I start all this I am looking to at a total of 30 different responses.
Can I next that many?

"Greg" wrote:

Yes it is possible with nested conditional fields.


{ IF { F1 } = "A"{ IF { F2 }="1""X"{ IF { F2 } = "2" "Y"{ IF { F2 } =
"3" "Z"""}}}}


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default IF / AND option?

I would suggest that data manipulation such as this is best done in the data
source. I am not sure of the exact limit on nested fields, but you may be
getting near it with the 30 different responses.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"jermsalerms79" wrote in message
...
before I start all this I am looking to at a total of 30 different
responses.
Can I next that many?

"Greg" wrote:

Yes it is possible with nested conditional fields.


{ IF { F1 } = "A"{ IF { F2 }="1""X"{ IF { F2 } = "2" "Y"{ IF { F2 } =
"3" "Z"""}}}}




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default IF / AND option?

See the example at http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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


jermsalerms79 wrote:
before I start all this I am looking to at a total of 30 different
responses. Can I next that many?

"Greg" wrote:

Yes it is possible with nested conditional fields.


{ IF { F1 } = "A"{ IF { F2 }="1""X"{ IF { F2 } = "2" "Y"{ IF { F2 } =
"3" "Z"""}}}}





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default IF / AND option?

Hi jermsalerms79,

You can nest a maximum of 20 IF tests in Word. However, you don't
necessarily have to nest that many to get the desired result. If you post
back more details of what you're working with and what you're trying to
achieve, alternative ways of catering for your 30 combinations can probably
be found.

Cheers


"jermsalerms79" wrote in message
...
is there a way to return text based on two fields.

IF field 1 = a
AND field 2 = 1
THEN result = x

IF field 1 = a
AND field 2 = 2
THEN result = y

IF field 1 = a
AND field 2 = 3
THEN result = z

IF field 1 = b
THEN result = BLANK

Is this possible.



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
No 'Save as' Option in Word 2003 Matt Keefe Microsoft Word Help 8 March 6th 06 05:35 PM
How do I save information from option buttons like other form data ReneeCMC Microsoft Word Help 0 July 19th 05 02:41 PM
how to group option buttons in word? Gallant Microsoft Word Help 1 June 28th 05 03:02 PM
Word Template and Macros (as an option on toolbar) Khan Microsoft Word Help 1 June 2nd 05 05:22 AM
option send to e-mail address (as attachment) unavailable NotAnExpert Microsoft Word Help 1 April 20th 05 03:36 PM


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