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:
To achieve this, select the RIGHT function and enter:
- Text: the text string (here, the reference number)
- Num_chars: the number of characters to extract from the right (here, 2)
=RIGHT(A2,2)
The RIGHT function indeed returns the last two characters of the reference number:
Now, all you have to do is stretch the formula down to complete the other cells: