• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with IF statement on cells that could contain text or numbers

Ross Mac

New Member
I need some help, I'm a basic user of Excel and have spent hours trying to work this out. I have data where I need to look at three cells and if any of them are greater than 100 I need to deliver a "Fail", otherwise a "Pass". The problem I am having is that in all cases either one or two of the cells has text in, "N/A" the formula therefore always returns a "Fail".

=IF(OR(T2>100,V2>100,X2>100),"FAIL","PASS")
 
Hi Ross,
Welcome to the forum

Your formula sees to be work, you just need to change the cell format to:
#;-#;"N/A";

and instead of inserting N/A in your cell try inserting 0.
above custom formatting will display 0 as N/A
and your formula will work same.
Regards,
 
I need some help, I'm a basic user of Excel and have spent hours trying to work this out. I have data where I need to look at three cells and if any of them are greater than 100 I need to deliver a "Fail", otherwise a "Pass". The problem I am having is that in all cases either one or two of the cells has text in, "N/A" the formula therefore always returns a "Fail".

=IF(OR(T2>100,V2>100,X2>100),"FAIL","PASS")
Hi,

If for whatever reason you cannot include the full range of T to X in your formula then you could do this

=IF(OR(AND(ISNUMBER(T2),T2>100),FALSE,AND(ISNUMBER(X2),X2>100)),"FAIL","PASS")

Me, I wouldn't put NA in the range.
 
=IF(OR(AND(ISNUMBER(T2),T2>100),FALSE,AND(ISNUMBER(X2),X2>100),FALSE,AND(ISNUMBER(V2),V2>100)),"FAIL","PASS")

That does the trick, many thanks for all your help!
 
=IF(OR(AND(ISNUMBER(T2),T2>100),FALSE,AND(ISNUMBER(X2),X2>100),FALSE,AND(ISNUMBER(V2),V2>100)),"FAIL","PASS")

That does the trick, many thanks for all your help!
Hi,

I don't know how that FALSE got into the middle of the formula, typo I guess. It does no harm but it's not necessary.

=IF(OR(AND(ISNUMBER(T2),T2>100),AND(ISNUMBER(X2),X2>100),AND(ISNUMBER(V2),V2>100)),"FAIL","PASS")
 
Back
Top