RIGHT
Returns the specified number of characters from the end of the string.
Syntax
=RIGHT(string, count)
Arguments
Argument | Type | Description |
---|---|---|
string | String | The string to get characters from |
count | Number | The number of characters to get |
Examples
=RIGHT("ABCDEF", 2)
→"EF"
Gets the last 2 characters from the string "ABCDEF"
=RIGHT("GHIJKL", 1)
→"L"
Gets the last character from the string "GHIJKL"
=RIGHT("MNOPQR", 0")
→#ERROR!
Gets the last 0 characters from the string "MNOPQR" (returns an error because the number of characters must be greater than or equal to 1
Updated 10 months ago