ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Formula (https://www.excelbanter.com/excel-worksheet-functions/189409-if-formula.html)

dazoloko via OfficeKB.com

If Formula
 
Dear All

I have two columns (A and B) that Contain a "Y" or "N" in column A and a Date
or Blank in Column B.

If A = "Y" and B has a Date in the Result is "OK"
if A = "N" and B has a Date in the Result is "Error"
If A = "Y" and B is Blank the Result is "Error"
If A = "N" and B is Blank the Result is "OK"

I am after a formula which will return an "OK" or "Error" depending on the
conditions above.

Could anyone assist ?

Many Thanks

D

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200805/1


Mike H

If Formula
 
Hi,

Put this in A1 and drag down.

=IF(AND(A1="y",ISNUMBER(B1)),"OK",IF(AND(A1="y",B1 =""),"Error",IF(AND(A1="N",ISNUMBER(B1)),"Error",I F(AND(A1="N",B1=""),"OK",""))))

Mike

"dazoloko via OfficeKB.com" wrote:

Dear All

I have two columns (A and B) that Contain a "Y" or "N" in column A and a Date
or Blank in Column B.

If A = "Y" and B has a Date in the Result is "OK"
if A = "N" and B has a Date in the Result is "Error"
If A = "Y" and B is Blank the Result is "Error"
If A = "N" and B is Blank the Result is "OK"

I am after a formula which will return an "OK" or "Error" depending on the
conditions above.

Could anyone assist ?

Many Thanks

D

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200805/1



Bob Phillips

If Formula
 
=IF(OR(AND(A1="Y",ISNUMBER(B1)),AND(A1="N",B1="")) ,"OK",
IF(OR(AND(A1="N",ISNUMBER(B1)),AND(A1="Y",B1="")), "Error",""))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"dazoloko via OfficeKB.com" <u43760@uwe wrote in message
news:84ec03adef584@uwe...
Dear All

I have two columns (A and B) that Contain a "Y" or "N" in column A and a
Date
or Blank in Column B.

If A = "Y" and B has a Date in the Result is "OK"
if A = "N" and B has a Date in the Result is "Error"
If A = "Y" and B is Blank the Result is "Error"
If A = "N" and B is Blank the Result is "OK"

I am after a formula which will return an "OK" or "Error" depending on the
conditions above.

Could anyone assist ?

Many Thanks

D

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200805/1




muddan madhu

If Formula
 
Try this one !!!!

=IF((A1="y")*(B10),"ok",IF((A1="n")*(B1=""),"ok", "error"))




On May 30, 4:30*pm, Mike H wrote:
Hi,

Put this in A1 and drag down.

=IF(AND(A1="y",ISNUMBER(B1)),"OK",IF(AND(A1="y",B1 =""),"Error",IF(AND(A1="N*",ISNUMBER(B1)),"Error", IF(AND(A1="N",B1=""),"OK",""))))

Mike



"dazoloko via OfficeKB.com" wrote:
Dear All


I have two columns (A and B) that Contain a "Y" or "N" in column A and a Date
or Blank in Column B.


If *A = "Y" and B has a Date in the Result is "OK"
if A = "N" and B has a Date in the Result is "Error"
If A = "Y" and B is Blank the Result is "Error"
If A = "N" and B is Blank the Result is "OK"


I am after a formula which will return an "OK" or "Error" depending on the
conditions above.


Could anyone assist ?


Many Thanks


D


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ions/200805/1- Hide quoted text -


- Show quoted text -



dazoloko via OfficeKB.com

If Formula
 
Thanks Mike !

D


Mike H wrote:
Hi,

Put this in A1 and drag down.

=IF(AND(A1="y",ISNUMBER(B1)),"OK",IF(AND(A1="y",B 1=""),"Error",IF(AND(A1="N",ISNUMBER(B1)),"Error", IF(AND(A1="N",B1=""),"OK",""))))

Mike

Dear All

[quoted text clipped - 14 lines]

D


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200805/1


Carla

If Formula
 
Thank you!!! I searched on a solution to my problem and came across this
posting which COMPLETELY worked for me in a similar situation!!! I learned
something in the process, that *=AND. I never knew that. Thank you muddan
madhu for replying to the person requesting help below! I was going to end
up bald from pulling my hair out trying to complete an "if(or(and" statement,
you saved my locks!

Carla
St. Petersburg, FL

"muddan madhu" wrote:

Try this one !!!!

=IF((A1="y")*(B10),"ok",IF((A1="n")*(B1=""),"ok", "error"))




On May 30, 4:30 pm, Mike H wrote:
Hi,

Put this in A1 and drag down.

=IF(AND(A1="y",ISNUMBER(B1)),"OK",IF(AND(A1="y",B1 =""),"Error",IF(AND(A1="NĀ*",ISNUMBER(B1)),"Error" ,IF(AND(A1="N",B1=""),"OK",""))))

Mike



"dazoloko via OfficeKB.com" wrote:
Dear All


I have two columns (A and B) that Contain a "Y" or "N" in column A and a Date
or Blank in Column B.


If A = "Y" and B has a Date in the Result is "OK"
if A = "N" and B has a Date in the Result is "Error"
If A = "Y" and B is Blank the Result is "Error"
If A = "N" and B is Blank the Result is "OK"


I am after a formula which will return an "OK" or "Error" depending on the
conditions above.


Could anyone assist ?


Many Thanks


D


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ions/200805/1- Hide quoted text -


- Show quoted text -




dazoloko via OfficeKB.com

If Formula
 
Thanks Bob and Thank you to all who took the time to respond. And glad it
helped you too Carla !

D


Bob Phillips wrote:
=IF(OR(AND(A1="Y",ISNUMBER(B1)),AND(A1="N",B1="") ),"OK",
IF(OR(AND(A1="N",ISNUMBER(B1)),AND(A1="Y",B1="")), "Error",""))

Dear All

[quoted text clipped - 15 lines]

D


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200805/1



All times are GMT +1. The time now is 04:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com