Forum Discussion
jtjohnston_quebec
Feb 21, 2021Copper Contributor
Combining IFS(SEARCH
I have a student quiz. I'm parsing a phrase to see if the student answered "survey" (case insensitive). I'm assigning 1 point for a correct answer .8 for the spelling survay .5 for servay Else 0 ...
- Feb 21, 2021
HansVogelaar
Feb 21, 2021MVP
jtjohnston_quebec The problem is that SEARCH returns an error value if the term is not found.
So if the student answers anything but "survey", the first SEARCH causes the entire formula to return an error; the rest of the formula isn't evaluated.
Apart from that, I'd make the function return numbers such as 0.8 instead of text strings such as "0.8".
=IFS(IFERROR(SEARCH("survey",F2),0),1,IFERROR(SEARCH("survay",F2),0),.8,IFERROR(SEARCH("servay",F2),0),.5,TRUE,0)
- jtjohnston_quebecFeb 21, 2021Copper ContributorThat explains it. I thought ifs was more supple 😇