Documentation/Calc Functions/LEFT/en

Function name:
LEFT

Category:
Text

Summary:
Extracts a sub-string from the left of the supplied text string, with the length of the sub-string specified in characters.

Syntax:
LEFT(Text[; Number])

Returns:
Returns a text string comprising the specified number of characters from the left side of the supplied text string.

Arguments:
Text is a text string (in quotation marks), a number, or a reference to a cell containing one of those types, that is the string from which characters are to be extracted.

Number is a non-negative integer, or a reference to a cell containing a non-negative integer, that is the number of characters to be extracted. If Number is omitted, LEFT uses the value 1.


 * If Number is non-numeric, then LEFT reports a #VALUE! error.
 * If Number is a non-integer value, LEFT truncates it to an integer value.
 * If Number is less than 0, then LEFT reports an invalid argument error (Err:502).
 * If Text has fewer characters than the value of Number, LEFT returns a copy of Text.

Additional details:
None.

Related LibreOffice functions:
LEFTB

MID

RIGHT

ODF standard:
Section 6.20.12, part 2

Equivalent Excel functions:
LEFT