Google Sheets Function: LEFT
The LEFT function returns a specified number of characters from the left of a string.
Usage:
=LEFT(string)
or
=LEFT(string, number_of_characters)
Usage Example
Here, the LEFT function will be used to retrieve the 3-digit code at the beginning of the reference:

To extract the code from the left, enter the reference and the number of characters into the function:
=LEFT(A2,3)

If the number of characters to retrieve is 1, it's not necessary to specify it:
=LEFT(string)