IF / AND option?

J

jermsalerms79

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.
 
G

Greg

Yes it is possible with nested conditional fields.


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

jermsalerms79

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

Doug Robbins - Word MVP

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
 
M

macropod

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top