New: ready-to-use spreadsheet templatesExplore the collection  →
Home/Formulas/LEFT / RIGHT / MID
TEXT · GOOGLE SHEETS

LEFT / RIGHT / MID
extract characters from the start, end or middle of text.

Use LEFT / RIGHT / MID to extract a prefix from an invoice number. This guide shows the exact structure, a working example and the mistakes most likely to break it.

JosephineVerified by JosephineReviewed July 25, 2026
THE FORMULA=LEFT(string, [number_of_characters])
A

stringsource text

B

number_of_charactersamount to return

TRY IT YOURSELF

Change the sheet.
Watch the answer update.

Edit any highlighted cell below. The example recalculates immediately.

LIVE PLAYGROUND=LEFT(A2,3)
fx=LEFT(A2,3)
A · TEXT
2
3
4
5
RESULTINVUpdates live

Try changing a value above. This example runs entirely in your browser.

IN PLAIN ENGLISH

How the formula
thinks.

  1. 01

    stringsource text

  2. 02

    number_of_charactersamount to return

COMMON FIXES

When LEFT / RIGHT / MID
doesn’t behave.

WRONG RESULT

Wrong result

Check that every range starts and ends on the same rows, and that numbers are stored as numbers.

FORMULA PARSE ERROR

Formula parse error

Check commas, quotation marks and closing parentheses. Your locale may use semicolons instead of commas.

UNEXPECTED BLANKS

Unexpected blanks

Test the source cells for hidden spaces, empty strings and inconsistent data types.

fxNeed help with LEFT / RIGHT / MID?Fix my formula →