LEFT function
the leftmost characters from a text value.
Text
Where can you use it?
Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.
Scenario in the workbook
Extract a document type from a fixed-width prefix.
A worked example from the workbook
| Row | A |
|---|---|
| 6 | Invoice code |
| 7 | INV-042 |
| 8 | inv-125 |
| 9 | AB-0007 |
Trial 1
=LEFT(A7,3)Expected resultINV
See the inputs and instructions for all 3 examplesSyntax
LEFT(text, [num_chars])
Copyable formulas
English Excel · en-US
=LEFT("INV-042",3)Turkish Excel · tr-TR
=SOLDAN("INV-042";3)Expected result
“INV”
Worked examples
Extract a document type from a fixed-width prefix.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A |
|---|---|
| 6 | Invoice code |
| 7 | INV-042 |
| 8 | inv-125 |
| 9 | AB-0007 |
| Case | Formula | Expected result |
|---|---|---|
| Trial 1 | =LEFT(A7,3) |
INV |
| Trial 2 | =LEFT(A8,3) |
inv |
| Trial 3 | =LEFT(A9,2) |
AB |