Right

Extracts characters from the right end of a string of characters (the last characters).

Syntax

Right(string, num_chars)
Droite(string, num_chars)
string = character string from which you want to extract the part on the right
num_chars = the number of characters to extract

Remarks

If num_chars is less than or equal to zero, the function will return an empty string.
If num_chars is greater than the number of characters in the string, then the string will be returned unchanged.

See also: Left if you want to extract the left part of the string, or Mid to extract a sub-string.

Examples

Right("banana", 4) = "nana"
Right("green", 6) = "green"
Right("fruit", -1) = "" (empty string)

Classification

Strings