#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default 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.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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.







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
If statement or lookup statement not sure Renegade40 Excel Worksheet Functions 2 January 18th 09 06:11 AM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"