1

Since quotation marks serve a special function, treating them as a character requires workarounds. There are a number of standard methods, such as doubling the quotation mark or using CHAR(32), its ASCII code.

I needed to strip quotes from around text, and tried every method I could find to represent the quote character in a formula, but nothing worked. LO Calc displayed the quotation marks, but all attempts to find or compare them in a formula failed to recognize them.

Diagnostics

  • I thought perhaps that was an item where the Excel methods didn't transfer to LO Calc. But Googling revealed that is not the case; the same methods should work in Calc.
  • I checked to verify the character code for the quotation marks. The quote symbol typed into Calc was not being stored as character 32, but as character 226.
  • It was not a keyboard issue. Typing a quote mark elsewhere checked out as character 32.
  • Character 226 isn't even a left or right quote (characters 147 and 148), it's the code for an accented character not used in English, â.
  • Since the stored code was for a foreign language character, I verified that all of the language and locale settings were US English (and they were).
  • Calc still treats the character as a quote mark for purposes such as designating text. But it doesn't behave as either a regular character or a quote mark for handling or use in a formula. It can't be used singly as a character for comparison, and it can't be doubled, either.

I'll post this as a self-answered question in case anyone else runs into the same situation.

1

Calc uses smart quotes by default. It auto-corrects normal quotes to smart quotes. Both left and right smart quotes are stored as the same character (226).

Solution

  • From the menu: Tools | Autocorrect Options
  • Deselect Replace for Single Quotes and Double Quotes

Your Answer

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.