Excel Function: LEFT
The Excel function LEFT retrieves the number of characters of your choice from the left of a text string.
Usage:
=LEFT(text, number_of_characters)
Example of use
The aim here is to retrieve the code that corresponds to the first 3 characters of the reference number:
![excel function left](https://www.excel-pratique.com/view/en/functions/img/left/excel-function-left.png)
Select the LEFT function and enter:
- Text: the text string (here, the reference number)
- Num_chars: the number of characters to extract from the left (here, 3)
=LEFT(A2,3)
![left function](https://www.excel-pratique.com/view/en/functions/img/left/left_function.png)
The LEFT function indeed returns the first three characters of the reference number:
![left](https://www.excel-pratique.com/view/en/functions/img/left/left.png)
Then stretch the formula down to complete the other cells: