Solved IF Range Contains A Certain Text Return multiple diff. Text

May 26, 2016 at 09:26:41
Specs: Windows 7
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....

See More: IF Range Contains A Certain Text Return multiple diff. Text

Report •


#1
May 26, 2016 at 10:49:05
✔ Best Answer
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


Report •

#2
May 26, 2016 at 11:03:45
How would I add for the 70, 85, and 100 in the same function?

Report •

#3
May 26, 2016 at 11:52:28
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 not find 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


Report •

Related Solutions

#4
May 26, 2016 at 12:06:05
That does make perfect sense and totally solved my problem! Thank you so much for your help!

Report •

Ask Question