Excel + Google Sheets · LEFT
Take the first characters of any text
Returns the first N characters of a text.
The formula
=LEFT(A2, 2)What each part means
A2The text2How many characters
Example
| A | B | |
|---|---|---|
| 1 | Order code | Country |
| 2 | ES-1043 | |
| 3 | BR-2210 | |
| 4 | IN-0087 | |
| 5 | MX-5521 |
| A | B | |
|---|---|---|
| 1 | Order code | Country |
| 2 | ES-1043 | ES |
| 3 | BR-2210 | BR |
| 4 | IN-0087 | IN |
| 5 | MX-5521 | MX |
Step by step
- Click cell B2.
- Type the formula:
=LEFT(A2, 2) - Press Enter.
- Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)