# Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes

1. ## Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes

Folks, I am admittedly a neophyte who has a secret love affair with Excel. But again, admittedly, I am armed with limited knowledge and I am finding it difficult to find teachings that are applicable to my need. Or perhaps the bigger issue is that I do not know how to apply them. Regardless, my question and need may be easy for some of you.

I have columns (Ex: B3 through B11) that have data in each cell. There are only 3 options for the data: YES, NO or N/A. I am simply trying to write a formula for a cell at the end of the column that bascially says that if there are any "NO" in any of the cells B3 through B11 above it, to state "FAIL" in the cell at the end of the column.

I have played with simple IF formulas, like =IF(B3:B11="NO","FAIL","PASS"), ubt I only get a #VALUE!

2. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

Try

=IF(COUNTIF(B3:B11,"no"),"FAIL","PASS")

3. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

Thank you very very very much. I am a fool and you were a kind teacher.

4. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

Fotis, your formula met my needs:

=IF(COUNTIF(B3:B11,"no"),"FAIL","PASS")

However, how can I amend the formula to leave the cell blank (do not return either fail or pass) IF all the cells B3:B11 are empty? (In other words, the cells have not had data entered yet)?

5. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

Perhaps.

=IF(COUNTA(B3:B11)=0,"",IF(COUNTIF(B3:B11,"no"),"FAIL","PASS"))

6. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

Yahoo!!!!! You did it again. Next time you visit Wisconsin, the first beer is on me (or is that breaking forum rules....)

Thank you.

7. ## Re: Formula needed to display "Pass" or "Fail" if a column contains any values other than

....(or is that breaking forum rules....)
Not at all! I take this as a promise

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1