formula to compare a complete row to find "yes" "no" or blank

  • I've tried a few different things thinking I was on the right track based on the IF, and AND function.


    I need to find if
    cell A1 = "Yes" and B1 ="Yes" C1 = "Yes"
    cell A1 = "Yes" and B1= "No" C1= "Yes"
    cell A1= "No" and B1 ="Yes" C1= "Yes"
    cell A1= "No" and B1 ="No" C1= "No"
    cell A1= "Blank" C1 = "Blank"


    I am not sure what formula to use for this
    any help appreciated

  • Re: formula to compare a complete row to find "yes" "no" or blank


    What about B1 being blank? And what are you wanting to return if these combinations occur?


    PS Welcome to the forum!

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

  • Re: formula to compare a complete row to find "yes" "no" or blank


    Hi
    thanks for the reply and welcome here
    I am not concerned with B1 if A1 is blank B1 can be "yes" or "no" I only need C1 to be blank if A1 is blank

  • Re: formula to compare a complete row to find "yes" "no" or blank


    I'm sorry, but I am not clear on what you are asking of us. Can you make it any clearer, please?

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

  • Re: formula to compare a complete row to find "yes" "no" or blank


    sorry I misunderstood the question if
    B1 is blank and A1= yes C1=Yes
    B1 is blank and A1= no C1=no
    my apologies

  • Re: formula to compare a complete row to find "yes" "no" or blank


    I would like to paste a formula into C to give these values depending on what is in A or B
    A B C
    1 YES YES YES
    2 YES NO YES
    3 NO YES YES
    4 NO NO NO
    5 YES
    6 NO
    7

  • Re: formula to compare a complete row to find "yes" "no" or blank


    OK. I think this will cover it:


    =IF(A1="YES","YES",IF(AND(A1="NO",B1="YES"),"YES",IF(AND(A1="NO",B1=""),"NO","NO")))

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

  • Re: formula to compare a complete row to find "yes" "no" or blank


    thank you almost except it is missing the No if both A&B are No
    I can get it with =IF(A4="no",B4,A4-IF(B4="no",B4))

  • Re: formula to compare a complete row to find "yes" "no" or blank


    thank you I only needed to add the No
    =IF(A1="YES","YES",IF(AND(A1="NO",B1="YES"),"YES",IF(AND(A1="NO",B1="NO"),"NO",IF(AND(A1="NO",B1=""),"NO","")))):thumbup:
    Your help is most appreciated

  • Re: formula to compare a complete row to find "yes" "no" or blank


    I changed my formula above to cover that, but your version will work, too. Glad to have helped! :)


    =IF(A1="YES","YES",IF(AND(A1="NO",B1="YES"),"YES",IF(AND(A1="NO",B1=""),"NO","NO")))

    Ali :)


    Enthusiastic self-taught user of MS Excel who's always learning!
    If anyone has helped you towards solving a problem, then you can thank them by clicking on the like icon bottom right.

    :!:Forum Rules

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!