Documentation/Calc Functions/RIGHT/en

Function name:
RIGHT

Category:
Text

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

Syntax:
RIGHT(Text[; Number])

Returns:
Returns a text string comprising the specified number of characters from the right 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, RIGHT uses the value 1.


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

Additional details:
None.

Related LibreOffice functions:
LEFT

MID

RIGHTB

ODF standard:
Section 6.20.19, part 2

Equivalent Excel functions:
RIGHT