R
Rhiannon
I'm working in Word 2007. I have a list of mergefields (anywhere between 3
and 7 depending) that I would like to test the values of - if all of them
come back true, return one block of text, else return another block of text.
It works fine when I try and compare the values of two mergefields:
{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} <> 2
} ) } = 1 "true" "false" }
but as soon as I try and compare the values of three or more mergefields:
{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} <> 2
}, { COMPARE {mergefield 3" = "text" } ) } = 1 "true" "false" }
it breaks. Is there a way to expand beyond two comparisons, using either the
=AND or the =OR formulas? I'd rather not start nesting piles of these if I
can help it. Thanks muchly!!
and 7 depending) that I would like to test the values of - if all of them
come back true, return one block of text, else return another block of text.
It works fine when I try and compare the values of two mergefields:
{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} <> 2
} ) } = 1 "true" "false" }
but as soon as I try and compare the values of three or more mergefields:
{IF { = AND ( { COMPARE {Mergefield 1} = "Y"}, {COMPARE {mergefield 2} <> 2
}, { COMPARE {mergefield 3" = "text" } ) } = 1 "true" "false" }
it breaks. Is there a way to expand beyond two comparisons, using either the
=AND or the =OR formulas? I'd rather not start nesting piles of these if I
can help it. Thanks muchly!!