View Single Post
  #12   Report Post  
Greg Maxey
 
Posts: n/a
Default

Lara,

I found some material that I had squirreled away on Word math fields. A
bright fellow that goes by Macropod shows us a relatively simple process:

{ If { =({ IF { County } = "Hillsborough""1""0" }+{ IF { County } =
"Pineallas""1" "0"}+{ IF { County } = "Lake""1""0" }+{ IF { County } =
"Orange""1""0" }+{ IF { County } = "Brevard""1""0" }+{ IF { County } =
"Indian River""1""0" }+{ IF { County } = "Volusia""1""0" }+{ IF { County } =
"Oceola""1""0" }) } 0 "Test Sat""Test Unsat }

Basically you just set up 8 condition equal 0 or 1 and add then up. One and
only one can be 1 and if any one is 1 then the condition {=(1)} 0 is met
and the true result displayed. As mentioned earlier, you should replace
"Test Sat" with an IncludeText field or AutoText field.




--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Lara Z wrote:
I am trying to code a merge document that will insert an additional
two-page document if the 'COUNTY' field is one of eight counties. The
additional document is the same for all eight counties. In
WordPerfect this could be done simply with the SWITCH/ENDSWITCH
construct. I know there is no equivalent in Word, but is there any
easier way to do this than doing eight back-to-back IF statements
with the same (redundant) two pages of text inserted in each "then"
part of the IF statement? Is there an OR operator in Word that might
help accomplish this?