Excel/Excel Formula

Advertisement


Question
QUESTION: What Formula should I write for :

If all G38, G39 and G40 are PASS then F2 should be Pass, and if any one or two of G38, G39 and G40 are Fail then  F2 should be Partial Pass, and if all G38, G39 and G40 are Fail then F2 should be Fail.


Please help me in this.

ANSWER: =if(and(G38="PASS",G39="PASS",G40="PASS"),"Pass",if(and(G38="FAIL",G39="FAIL",G40="FAIL"),"Fail","Partial Pass"))

would do it

---------- FOLLOW-UP ----------

QUESTION: Unfortunately, if G39 and G38 and G40 all are pass then it still shows as partial pass? the formula needs coreection :(

Answer
I would have G38, G39 and G40 set to have data validation on them which would only allow entries as specified.  At the moment one of the cells you refer to does not equal Pass - it might be pass with a space for example - if it did, the formula would return the right results - happy to look at an example sheet to explain why it doesn't work (aidan.heritage@virgin.net will get me)

A more complicated formula which would also NOT return a grade until all three cells have something in it and which gets rid of trailing or leading spaces is:

=IF(COUNTA(G38:G40)<3,"",IF(AND(TRIM(UPPER(G38))="PASS",TRIM(UPPER(G39))="PASS",TRIM(UPPER(G40))="PASS"),"Pass",IF(AND(TRIM(UPPER(G38))="FAIL",TRIM(UPPER(G39))="FAIL",TRIM(UPPER(G40))="FAIL"),"Fail","Partial Pass")))  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Aidan Heritage

Expertise

I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!

Experience

My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

Education/Credentials
I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2016 About.com. All rights reserved.