Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

If Formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dazoloko - 30 May 2008 12:12 GMT
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
Mike H - 30 May 2008 12:30 GMT
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

> Dear All
>
[quoted text clipped - 14 lines]
>
> D
muddan madhu - 30 May 2008 13:16 GMT
Try this one !!!!

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

> Hi,
>
[quoted text clipped - 28 lines]
>
> - Show quoted text -
Carla - 31 May 2008 03:52 GMT
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

> Try this one !!!!
>
[quoted text clipped - 32 lines]
> >
> > - Show quoted text -
dazoloko - 30 May 2008 16:51 GMT
Thanks Mike !

D

>Hi,
>
[quoted text clipped - 9 lines]
>>
>> D
Bob Phillips - 30 May 2008 13:15 GMT
=IF(OR(AND(A1="Y",ISNUMBER(B1)),AND(A1="N",B1="")),"OK",
 IF(OR(AND(A1="N",ISNUMBER(B1)),AND(A1="Y",B1="")),"Error",""))

Signature

HTH

Bob

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

> Dear All
>
[quoted text clipped - 15 lines]
>
> D
dazoloko - 31 May 2008 10:33 GMT
Thanks Bob and Thank you to all who took the time to respond. And glad it
helped you too Carla !

D

>=IF(OR(AND(A1="Y",ISNUMBER(B1)),AND(A1="N",B1="")),"OK",
>  IF(OR(AND(A1="N",ISNUMBER(B1)),AND(A1="Y",B1="")),"Error",""))
[quoted text clipped - 4 lines]
>>
>> D
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.