Forum Discussion
emzyan0160
Jan 22, 2025Copper Contributor
If formula problem
Hi all! I am new to using excel so I appreciate your help in advance :) I created a spreadsheet to track multiple choice answers for a quiz. This is the formula to track if people got the answer right:
=IF(F3="a",1,IF(F3="b",0,IF(F3="c",0,IF(F3="d",0,IF(F3="-",0,NA)))))
However, someone answered "bd" instead of only selecting one and the formula resulted in an error. How do I correct the formula so that the answer would be "0" in that case? Thank you?
2 Replies
Sort By
As variant
=IF(F3 = "a", 1, IF( SUM( --ISNUMBER( SEARCH( {"b","c","d","-"}, F3) ) ), 0, "NA" ))
=IF(F3="a", 1, 0)