LEFT, RIGHT and MID in Google Sheets
Use LEFT, RIGHT, and MID to pull characters from a string — the start, the end, or a slice from the middle of any text.
=LEFT(A2, 3)
Returns the first 3 characters of the text in A2. Use RIGHT for the end and MID for the middle.
How it works
LEFT takes a text value and a count and returns that many characters from the start. RIGHT does the same from the end. MID takes a text value, a start position (1 is the first character), and a length, returning a slice from the middle. Combine them with FIND or SEARCH to cut at a specific character rather than a fixed number.
Variations
Last N characters
=RIGHT(A2, 4)
Returns the final 4 characters — handy for a year or a code suffix.
Slice from the middle
=MID(A2, 3, 5)
Starts at character 3 and returns 5 characters.
Everything before a space
=LEFT(A2, FIND(" ", A2)-1)
FIND locates the first space; LEFT keeps everything up to it — the first word.
File extension after the dot
=RIGHT(A2, LEN(A2)-FIND(".", A2))
Returns the characters after the first dot.
Examples
| Scenario | Formula |
|---|---|
| Area code from a phone | =LEFT(A2, 3) |
| Last 4 of an ID | =RIGHT(A2, 4) |
| Middle initials | =MID(A2, 5, 2) |
FAQ
How do I get the first word of a cell?
Combine LEFT with FIND: LEFT(A2, FIND(" ", A2)-1) returns everything before the first space.
What's the difference between MID and LEFT/RIGHT?
LEFT and RIGHT take characters from the ends; MID takes a slice from any start position for a given length.
Why does MID return an error or blank?
The start position must be 1 or more. If it points past the end of the text, MID returns an empty string.