![]() |
IF OR statement help
My name says it all!!
In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
IF OR statement help
If I4 will contain only Y or N, you can do simply:
=if(J4="y","R","") However, if you want to bullet-proof things, you can do: =if(and(J4="y",or(I4="y",I4="n")),"R","") Note: You do not mention what W4 should be if the condition for "R" is not met. I have arbitrarily chosen a null string, which appears blank. ----- original message ----- "Frustrated!!!" wrote in message ... My name says it all!! In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
IF OR statement help
Thanks so much for that, formulas do my head in! Unfortunately I now realise
that I need to cover the other condition of: or I4=Y AND J4=N Sorry to be a pain.. "JoeU2004" wrote: If I4 will contain only Y or N, you can do simply: =if(J4="y","R","") However, if you want to bullet-proof things, you can do: =if(and(J4="y",or(I4="y",I4="n")),"R","") Note: You do not mention what W4 should be if the condition for "R" is not met. I have arbitrarily chosen a null string, which appears blank. ----- original message ----- "Frustrated!!!" wrote in message ... My name says it all!! In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
IF OR statement help
"Frustrated!!!" wrote:
I now realise that I need to cover the other condition of: or I4=Y AND J4=N I'm not sure I fully understand your requirement. Adding your previous ones, are you now saying that you want W4 to be "R" if any of the following conditions is met: I4=y and J4=y I4=y and J4=n I4=n and J4=y If so, and if I4 and J4 will only have Y or N, it seems that the only condition when W4 should not be "R" is when I4=n and J4=n. Is that right? If so, then: =IF(AND(I4="n",J4="n"),"","R") If you also want a null string result (not "R") when I4 or J4 is not Y or N, then: =IF(OR(AND(I4<{"y","n"}),AND(J4<{"y","n"}),AND(I 4="n",J4="n")),"","R") ----- original message ----- "Frustrated!!!" wrote in message ... Thanks so much for that, formulas do my head in! Unfortunately I now realise that I need to cover the other condition of: or I4=Y AND J4=N Sorry to be a pain.. "JoeU2004" wrote: If I4 will contain only Y or N, you can do simply: =if(J4="y","R","") However, if you want to bullet-proof things, you can do: =if(and(J4="y",or(I4="y",I4="n")),"R","") Note: You do not mention what W4 should be if the condition for "R" is not met. I have arbitrarily chosen a null string, which appears blank. ----- original message ----- "Frustrated!!!" wrote in message ... My name says it all!! In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
IF OR statement help
Cell W4 needs to be R if:
I4 and J4 = Y or I4 = N and J4 = Y or I4=Y AND J4=N Assuming the entries can only the be single letters Y or N. =IF(OR(I4&J4={"YY","YN","NY"}),"R","") -- Biff Microsoft Excel MVP "Frustrated!!!" wrote in message ... Thanks so much for that, formulas do my head in! Unfortunately I now realise that I need to cover the other condition of: or I4=Y AND J4=N Sorry to be a pain.. "JoeU2004" wrote: If I4 will contain only Y or N, you can do simply: =if(J4="y","R","") However, if you want to bullet-proof things, you can do: =if(and(J4="y",or(I4="y",I4="n")),"R","") Note: You do not mention what W4 should be if the condition for "R" is not met. I have arbitrarily chosen a null string, which appears blank. ----- original message ----- "Frustrated!!!" wrote in message ... My name says it all!! In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
IF OR statement help
can only the be
Spell check can only cover for you to a point! -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y or I4=Y AND J4=N Assuming the entries can only the be single letters Y or N. =IF(OR(I4&J4={"YY","YN","NY"}),"R","") -- Biff Microsoft Excel MVP "Frustrated!!!" wrote in message ... Thanks so much for that, formulas do my head in! Unfortunately I now realise that I need to cover the other condition of: or I4=Y AND J4=N Sorry to be a pain.. "JoeU2004" wrote: If I4 will contain only Y or N, you can do simply: =if(J4="y","R","") However, if you want to bullet-proof things, you can do: =if(and(J4="y",or(I4="y",I4="n")),"R","") Note: You do not mention what W4 should be if the condition for "R" is not met. I have arbitrarily chosen a null string, which appears blank. ----- original message ----- "Frustrated!!!" wrote in message ... My name says it all!! In Excel 2003 I am trying to get a third result from 2 other Y/N results. What I need is: Cell W4 needs to be R if: I4 and J4 = Y or I4 = N and J4 = Y I have tried other avenues and I'm hoping someone here can help. |
All times are GMT +1. The time now is 05:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com