Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
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. |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
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. |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I set up a merge field to convert a numerical value into text? | Mailmerge | |||
format a number to result in text | Mailmerge | |||
keeping a field result with text | Microsoft Word Help | |||
If statement returning true result when should be false | Mailmerge | |||
adding a page break as a result of an IF statement | Mailmerge |