I am using sheets to mark quiz responses. I am trying to display a 1 if the answer contains a certain string (therefore, is correct).

For example, COUNTIF(d2, "*serbia"). So, if D2 contains this text, display a 1.

However, I want to get the text "serbia" (for example) from another cell. So a separate cell just contains "serbia" and I refer to that cell in the COUNTIF function.

So, if D2 contains the text from C19, display a 1.

New contributor
Kris G is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You can use & to create the criterion you need. Since the given answer may not end with the correct answer, I would add another * as well:



enter image description here

| improve this answer | |

Your Answer

Kris G is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.