• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

ANDing values in excel

Ramesha

Member
Hi Friends:

I, do not know what is wrong in the enclosed excel formula, pl suggest(as usual I'm not able to upload excel, as I, do not see the file while trying to enclose, hence enclosing renamed file in docx)

Thanks,
 

Attachments

  • Comparing values.docx
    8.5 KB · Views: 2
You should nest AND in IF statement to return "OK" if AND condition is TRUE and "NOK" if it's FALSE.

As well, you need text value your are checking inside AND in "".
Code:
=IF(AND(A3="OK",B3="OK",C3="OK",D3="OK"),"OK","NOK")

Alternate method
Code:
=IF(SUMPRODUCT(--(A3:D3="OK"))=4,"OK","NOK")
 

Attachments

  • Comparing values_IFAND.xlsx
    9.5 KB · Views: 2
You should nest AND in IF statement to return "OK" if AND condition is TRUE and "NOK" if it's FALSE.

As well, you need text value your are checking inside AND in "".
Code:
=IF(AND(A3="OK",B3="OK",C3="OK",D3="OK"),"OK","NOK")

Alternate method
Code:
=IF(SUMPRODUCT(--(A3:D3="OK"))=4,"OK","NOK")
Thanks
 
Back
Top