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](https://www.excel-pratique.com/view/en/functions/img/right/excel-function-right.png)
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)
![right function](https://www.excel-pratique.com/view/en/functions/img/right/right_function.png)
The RIGHT function indeed returns the last two characters of the reference number:
![right](https://www.excel-pratique.com/view/en/functions/img/right/right.png)
Now, all you have to do is stretch the formula down to complete the other cells: