Excel Function: RIGHT

The Excel function RIGHT retrieves the number of characters of your choice from the right of a text string.

Usage:

=RIGHT(text, number_of_characters)


Example of use

The aim here is to retrieve the code that corresponds to the last 2 characters of the reference number:

excel function right

To achieve this, select the RIGHT function and enter:

=RIGHT(A2,2)
right function

The RIGHT function indeed returns the last two characters of the reference number:

right

Now, all you have to do is stretch the formula down to complete the other cells:

right down