Google Sheets formula for “if contains” for grading multiple choice quiz

by linda   Last Updated October 19, 2019 16:03 PM

I want to use a Google Sheets formula to correct a multiple choice survey that I built using Squarespace. The results get dumped into Google sheets.

For example, if the respondent selects choice:

  • A. then they would get 0 points
  • B. then they would get 1 point
  • C. then they would get 2 points

I tried to string several Regexmatch statements together such as the below but it won't work for more than one regexmatch at a time:

=if(regexmatch(A2, "A."), 0,) (regexmatch(A2, "B."), 1,) (regexmatch(A2, "C."), 2,)

Any advice would be appreciated. Thanks!

Related Questions

Updated September 19, 2018 13:03 PM

Updated February 06, 2018 19:03 PM

Updated April 12, 2019 01:03 AM

Updated May 08, 2019 09:03 AM

Updated May 23, 2019 03:03 AM