• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Excel Logic Query

Netraider

Alumni Member
Thanks received
27
I have 5 cells, A1 - A5 for example with or without content. I need A6 to = "Pass" for the following....

A1 = Anything
B1 = Anything
C1 = Empty
D1 = Empty
E1 = Anything

I need A6 to = "Fail" for any other condition.

I have been playing with =If(And for a couple of hours but am having issues around working with either empty cells or cells that aren't empty.

Any hints or tips?
 
You need the isblank and and statements

=IF(AND(ISBLANK(A1)=FALSE,ISBLANK(B1)=FALSE,ISBLANK(C1)=TRUE,ISBLANK(D1)=TRUE,ISBLANK(E1)=FALSE),"Pass","Fail")
 
Many thanks, Eeks formula was easier to use in this situation, but a fantastic fast response as always from the CUK IT Helpdesk.
 
Late to the party but I would have done:
Code:
=IF(AND(NOT(ISBLANK(A1)),NOT(ISBLANK(B1)),ISBLANK(C1),ISBLANK(D1),NOT(ISBLANK(E1))),"Pass","Fail")

or maybe:
Code:
=IF(OR(ISBLANK(A1),ISBLANK(B1),NOT(ISBLANK(C1)),NOT(ISBLANK(D1)),ISBLANK(E1)),"Fail","Pass")
 

Advertisers

Back
Top