Forum Discussion
Kathy_CPDdesign
Feb 28, 2024Copper Contributor
Problem with Nested IF AND OR formulas
I want to compare data in two cells and return a result based on the following rules: IF A2 = "wrong" AND A3 = "correct", return "improved" IF A2 = "correct" AND A3 = "correct", return "reinforced"...
- Feb 28, 2024
Kathy_CPDdesign The #NAME? errors you're getting is likely due to your use of the right double quotation marks ” (ASCII code 148) as opposed to the correct double quotes " (ASCII code 34) accepted in Excel formulas. Try copying and pasting the modified formula below and see if it works as expected:
=IF(AND(A2="wrong",A3="correct"),"improved",IF(AND(A2="correct",A3="correct"),"reinforced",IF(AND(A3="wrong",OR(A2="wrong",A2="correct")),"no impact","missing data")))
djclements
Feb 28, 2024Bronze Contributor
Kathy_CPDdesign The #NAME? errors you're getting is likely due to your use of the right double quotation marks ” (ASCII code 148) as opposed to the correct double quotes " (ASCII code 34) accepted in Excel formulas. Try copying and pasting the modified formula below and see if it works as expected:
=IF(AND(A2="wrong",A3="correct"),"improved",IF(AND(A2="correct",A3="correct"),"reinforced",IF(AND(A3="wrong",OR(A2="wrong",A2="correct")),"no impact","missing data")))
Kathy_CPDdesign
Feb 28, 2024Copper Contributor
Thank you! Works perfectly now. Appreciate your help
- djclementsFeb 28, 2024Bronze ContributorYou're welcome 🙂