I have a range of cells that can be Fail, 70, 85, or 100. I need to have so if one of the cells has the lesser value displayed but I don't know how to work it. So if one of the 7 cells is fail, it should be fail. If no fails, but some have 70, then 70. If no fail or 70, then 85....

Assuming your range is A1:G1, try this. Modify as required: =IF(COUNTIF(A1:G1,"Fail"),"Fail",MIN(A1:G1))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03

How would I add for the 70, 85, and 100 in the same function?

The formula already deals with the number grades. I got the impression that if Fail was not present, you want to return the lowest grade. That's what the formula does. If the COUNTIF portion of the formula finds at least one occurrence of the word Fail, then the IF function is TRUE and the formula will return "Fail".

If the COUNTIF portion does

notfind any occurrence of the word Fail, then the IF will be FALSE, and the MIN(range)clause will be evaluated, returning the lowest grade in the range.Isn't that what you want?

If so, then you should look up how an IF function works. Perhaps it will make more sense. Let me know.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03

That does make perfect sense and totally solved my problem! Thank you so much for your help!

Ask Your Question

Weekly Poll

Do you trust smart speakers to not spy on you?

Discuss in The Lounge

Poll History