View Single Post
  #4   Report Post  
Posted to microsoft.public.word.tables
covingj covingj is offline
external usenet poster
 
Posts: 9
Default IF statement using numerical expression with a text result

Thank you, I believe I got it to work. Unfortunately I am still having
difficulty with IF statements in the project I'm working on. I referred to
the document linked in the reply, and have tried to figure out what I am
trying to do, but I keep getting the same errors. In the document it says
that AND functions do not work for text strings, but you can approximate the
function with IF statements. I followed the instructions, but keep getting:
Error! Unknown op code for conditional. I'm sure I'm overlooking an obvious
error.

I have three criteria that have been tested with Pass/Fail results. I now
want to test so that if the person passes all three criteria, then they are
referred. If they fail any of the three criteria, then they are not referred.
The three criteria are bookmarked as Crit_1, Crit_2, and Crit_3. I am using
text form fields to gather the original data but I am not using a form field
for the calculations. The formula I created is as follows:

{ IF { IF { Crit_1 }= €śPass€ť 1 0 } * { IF { Crit_2 }= €śPass€ť 1 0 } * { IF {
Crit_3 }= €śPass€ť 1 0 }=1 €śRefer€ť €śDo Not Refer€ť}

The { } was created using Crtl-F9.

Once again thank you for any help that may be provided.


"macropod" wrote:

Hi covingj,

Press Ctrl-F9 twice to create a pair of nested field braces (ie '{ { } }'), then fill in the space between them so that you end up
with:
{IF{High} 540 "Pass" "Fail")}

For more information on this and a wide range of other calculations in Word, check out my Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442
or
http://www.gmayor.com/downloads.htm#Third_party


--
Cheers
macropod
[MVP - Microsoft Word]


"covingj" wrote in message news
I am trying to create a IF statement that will test a numerical expression
that will result in a text string. Of course I can get this to work in Excel,
but when I put the Excel object into a Word document, it gets ugly when you
go to use it. With my end users, the page can't be changing or they freak out.

Anyway, the statement I'm trying to create in the table would be like so:

=IF (High 540, "Pass", "Fail")

High is a named text field where the user enters a monetary value which is
then tested to determine if the result is pass/fail.

Any help would be greatly appreciated.