Reply
 
Thread Tools Display Modes
  #1   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

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.
  #2   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

Sorry, meant to mention that I am using Office 2003.

"covingj" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default IF statement using numerical expression with a text result

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.


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



  #5   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default IF statement using numerical expression with a text result

Hi covingj,

Your last '}=1' needs a space - it should be '}= 1'.

You can also delete a number of extraneous spaces, as in:
{IF{IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1 0}= 1 "Refer" "Do Not Refer"}

--
Cheers
macropod
[MVP - Microsoft Word]


"covingj" wrote in message ...
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.






  #6   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

Thanks again. I still can't get it to work. I toggled through the codes, and
it looked like it was only solving the IF statement for Crit_1. I enclosed
the IF statements for the three criteria in parenthesis, and then it solved
all three IFs. It appears to stop at that point and not solve the overall IF
statement. I may just give up and stay with the ugly Excel object solution. I
am including the latest version of the formula just in case you have any last
ideas because I'm stubborn and it bugs me that this isn't working.

{IF({IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1
0})= 1 "Refer" "Do Not Refer"}

It solves down to this point:

{IF(1*1*1)= 1 "Refer" "Do Not Refer"}

Thanks again.

"macropod" wrote:

Hi covingj,

Your last '}=1' needs a space - it should be '}= 1'.

You can also delete a number of extraneous spaces, as in:
{IF{IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1 0}= 1 "Refer" "Do Not Refer"}

--
Cheers
macropod
[MVP - Microsoft Word]


"covingj" wrote in message ...
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.




  #7   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default IF statement using numerical expression with a text result

Hi covingj,

Try:
{IF{={IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1 0}}= 1 "Refer" "Do Not Refer"}


--
Cheers
macropod
[MVP - Microsoft Word]


"covingj" wrote in message ...
Thanks again. I still can't get it to work. I toggled through the codes, and
it looked like it was only solving the IF statement for Crit_1. I enclosed
the IF statements for the three criteria in parenthesis, and then it solved
all three IFs. It appears to stop at that point and not solve the overall IF
statement. I may just give up and stay with the ugly Excel object solution. I
am including the latest version of the formula just in case you have any last
ideas because I'm stubborn and it bugs me that this isn't working.

{IF({IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1
0})= 1 "Refer" "Do Not Refer"}

It solves down to this point:

{IF(1*1*1)= 1 "Refer" "Do Not Refer"}

Thanks again.

"macropod" wrote:

Hi covingj,

Your last '}=1' needs a space - it should be '}= 1'.

You can also delete a number of extraneous spaces, as in:
{IF{IF{Crit_1}= "Pass" 1 0}*{IF{Crit_2}= "Pass" 1 0}*{IF{Crit_3}= "Pass" 1 0}= 1 "Refer" "Do Not Refer"}

--
Cheers
macropod
[MVP - Microsoft Word]


"covingj" wrote in message ...
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.





  #8   Report Post  
Posted to microsoft.public.word.tables
covingj covingj is offline
external usenet poster
 
Posts: 9
Default Thank you IF statement using numerical expression with text re

Thank you for your patience. This worked just like I wanted it to. You have
been very helpful
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
Can I set up a merge field to convert a numerical value into text? JB Mailmerge 1 November 20th 06 04:02 AM
format a number to result in text Taz Mailmerge 1 July 18th 06 04:27 AM
keeping a field result with text Jules Microsoft Word Help 4 November 10th 05 09:37 PM
If statement returning true result when should be false JodiMac Mailmerge 0 October 31st 05 08:52 PM
adding a page break as a result of an IF statement [email protected] Mailmerge 2 February 17th 05 10:17 PM


All times are GMT +1. The time now is 01:40 AM.

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"