28

I am not super computer literate. I am trying to use the equations to grade my Google quiz, the problem is that there is a quote in the answer. Is there a different symbol I need to use?

This is what I have right now:

=if(C2= "Aubrey said, "you are my favorite friend."", 10, 0)

The answer is Aubrey said, "you are my favorite friend."

I would just omit the quotes in the answer but it meant for an English quiz, so that may be sending the wrong message.

0

3 Answers 3

34

You need to prepend your "s with another ":

=if(C2= "Aubrey said, ""you are my favorite friend.""", 10, 0)

Notice how you get three "s in a row - that's two "s to close the citation, and the last one to end the text string.

10

Here is another way to do it in Google Sheets:

If A1 = Hello" World

Then you can compare to it using =IF(A1 = CONCATENATE("Hello",char(34)," World"),TRUE,FALSE)

That way you are using char(34) to substitute for " and CONCATENATE() to combine it into a single string.

0

Remark on this solution:

=IF(A1 = CONCATENATE("Hello",char(34)," World"),TRUE,FALSE)

Please be noticed that you have " CHAR(34) and ״ CHAR(1524)

You can find your code by adding your needed char to the beginning of a string: e.g. let say you want to find ״ code then create in a separate cell [e.g. B2] the string ״aaa (the ״ is the first char and the rest is to verify that Google figures out this cell content as a string type) than in another cell use this formula to convert the first char into Unicode index =UNICODE(B2). As a result, you will get 1524 then you can use it:

=IF(A1 = CONCATENATE("Hello",char(1524)," World"),TRUE,FALSE)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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