Frequently asked questions - General

    From The Document Foundation Wiki
    < Faq‎ | General
    Other languages:

    How to escape characters?

    Some characters that can be included in a cell inside a spreadsheet application or a word processor are used by the application itself. Examples are the double quotation mark(") that marks the beginning or the end of a text-only argument of a function.

    To include this kind of characters inside a formula an escape mechanism is needed that tells the application you really do just want to include this character in a formula and did not type in this character since you wanted to end a formula or something. These mechanisms are documented on this wiki page.

    Telling LibreOffice Calc that a formula is meant to be text

    If you want to fill a spreadsheet cell with text that looks like a formula LibreOffice can be hindered from evaluating this formula by preceeding this formula by a single quotation mark (').

    Entering a single quotation mark as the first character of a formula

    Since the single quotation mark (') as the first character of a cell has a special meaning, if you want to start a cell with a single quotation mark you have to double it ('').

    Including a text portion ("string") that contains strange characters into a formula

    Just put the text string between two double quotation marks (") and LibreOffice will take the characters you type in as they are without attempting to interpret them.

    Entering a double quotation mark inside a formula

    Since the double quotation mark is used to tell LibreOffice that a text portion is just meant to be a text portion and LibreOffice should not try to interpret this text a separate mechanism is needed to tell the program that this double quotation mark is meant to be part of the text portion instead. Just doubling the double quotation mark wouldn't be a good idea, though: The resulting character sequence ("") is already used to mark an empty string.

    So if you want to use a double quotation mark inside a formula you have to type in four double quotation marks in a row ( """") instead.