LEFT Function in Excel, Google Sheets, Airtable & Notion
LEFT returns a set number of characters from the start of a text string. LEFT("INV-2024-0042", 3) is “INV”.
Syntax in each app
| App | Support | Syntax & notes |
|---|---|---|
| Excel | ✔ Built in | LEFT(text, [num_chars])num_chars defaults to 1. |
| Google Sheets | ✔ Built in | LEFT(string, [number_of_characters]) |
| Airtable | ✔ Built in | LEFT(string, howMany) |
| Notion | ✔ Built in | substring(text, 0, num_chars)Notion positions are 0-based and the end is exclusive, so substring(text, 0, 3) returns the first 3 characters. |
| Excel | =LEFT("INV-2024-0042", 3) | open excel.new ↗ |
|---|---|---|
| Google Sheets | =LEFT("INV-2024-0042", 3) | open sheets.new ↗ |
| Airtable | LEFT("INV-2024-0042", 3) | |
| Notion | substring("INV-2024-0042", 0, 3) |
Excel & Sheets use cell ranges. Paste this sample data into cell A1 of a blank sheet, then paste the formula into any empty cell.
Arguments
| Argument | What it means |
|---|---|
text | The text to take characters from. Numbers are treated as text. |
[num_chars] optional | How many characters to return. Defaults to 1; more than the length returns the whole text; negative is #VALUE!. |
Examples
| Formula | Result | Why | Copy |
|---|---|---|---|
=LEFT("INV-2024-0042", 3) | INV | A fixed-length prefix. | |
=LEFT(A2, FIND(" ", A2) - 1) | First word | Everything before the first space. See FIND. | |
=LEFT("Hello") | H | num_chars defaults to 1. | |
=VALUE(LEFT("2024-11-19", 4)) | 2024 | LEFT returns text; wrap in VALUE to get a number. |
Examples use Excel / Google Sheets syntax unless noted.
How LEFT works
LEFT is the simplest way to cut a fixed-length prefix from codes, IDs and dates stored as text: the first 3 letters of an invoice number, the first 2 digits of a postcode, the year from “2024-11-19”. Combine it with FIND or SEARCH when the length varies: =LEFT(A2, FIND("@", A2) - 1) returns the part of an email address before the @.
LEFT always returns text, even when it is cutting a number, so =LEFT(2024, 2) is the text “20”. Comparing that to the number 20 gives FALSE; wrap it in VALUE or multiply by 1. If the cell holds a real date, LEFT works on the serial number (45615), not on what you see; use YEAR or TEXT() instead.
Airtable's LEFT(string, howMany) works the same, but the count is required. Notion has no LEFT; substring(text, 0, n) does the same thing, because Notion counts from 0 and stops before the end position.
Frequently Asked Questions
- How do I get everything before a certain character?
- Find the character, then take one less:
=LEFT(A2, FIND("-", A2) - 1). Wrap in IFERROR in case the character is missing. - How do I remove the first few characters instead?
- Use RIGHT with the remaining length:
=RIGHT(A2, LEN(A2) - 3), or=MID(A2, 4, LEN(A2)).