Google Sheets Function: RIGHT

The RIGHT function returns a specified number of characters from the right of a string.

Usage:

=RIGHT(string)

or

=RIGHT(string, number_of_characters)


Usage Example

Here, the RIGHT function will be used to retrieve the country code by extracting the last 2 characters of the reference:

google sheets right function

To extract the country code from the right, enter the reference and the number of characters into the function:

=RIGHT(A2,2)
google sheets right function extract
If the number of characters to retrieve is 1, it's not necessary to specify it: =RIGHT(string)