+ Reply to Thread
Results 1 to 7 of 7

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

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Waukesha, WI
    MS-Off Ver
    Excel 2007
    Posts
    4

    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. #2
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

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

    Try

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

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Waukesha, WI
    MS-Off Ver
    Excel 2007
    Posts
    4

    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.

    Enjoy your day!

  4. #4
    Registered User
    Join Date
    03-26-2013
    Location
    Waukesha, WI
    MS-Off Ver
    Excel 2007
    Posts
    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. #5
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    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. #6
    Registered User
    Join Date
    03-26-2013
    Location
    Waukesha, WI
    MS-Off Ver
    Excel 2007
    Posts
    4

    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. #7
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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