Excel tutorial
/

Functions

Beginner

How to use LEFT in Excel: extract characters from the start of text

LEFT takes characters from the start of text: a passport series, a region code on a number plate, a surname. Pairing with FIND, plus number and date traps.

LEFT cuts the number of characters you specify from the left side of a text — that is, from the beginning.

Real-life examples:

  • From passport number AB1234567 — the series AB.
  • From the number plate “01 A 777 AA” — the region code 01.
  • From a product code like “TSH-0147” — the branch TSH.
  • From “Karimov Aziz” — the surname Karimov (here LEFT works together with FIND).

When cleaning and grouping data exported from other software, LEFT is one of the most used text functions.

Книга1 - Excel
—☐✕
C2fx=ЛЕВСИМВ(B2;2)
ABCD
1Full namePassportSeries
2Karimov AzizAB12345671AB2
3Rahimova DilnozaAD7654321AD
4Tursunov JavohirAC0034512AC
5Yusupova MalikaAB9081726AB
6
Готово
=LEFT(B2,2) — the first 2 characters of AB1234567 (1): AB (2)

Syntax

=ЛЕВСИМВ(text; [num_chars])

  • text — the text or a cell containing text.
  • num_chars — how many characters to take. If omitted — 1 character. Larger than the text length — the whole text comes back. A negative number — #VALUE!.

Important: spaces, hyphens and dots are characters too. And the result is always text — even when it consists of digits like “2025”.

Writing LEFT step by step

1

Select C2. On the Формулы tab, click Текстовые and pick LEFT from the list.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
C2fx
ABCD
1Full namePassportSeries
2Karimov AzizAB1234567
3Rahimova DilnozaAD7654321
4Tursunov JavohirAC0034512
5
Готово

2

In the Function Arguments box: Text — click B2, Num_chars — 2. The preview at the bottom already shows the result: “AB”.

Книга1 - Excel
—☐✕
C2fx
ABCD
1Full namePassportSeries
2Karimov AzizAB1234567
3Rahimova DilnozaAD7654321
4Tursunov JavohirAC0034512
5Yusupova MalikaAB9081726
6
Готово

3

Click OK and double-click the fill handle — the formula runs to the end of the list. Now you can filter by series or count them with COUNTIF.

Книга1 - Excel
—☐✕
C2fx=ЛЕВСИМВ(B2;2)
ABCD
1Full namePassportSeries
2Karimov AzizAB1234567AB
3Rahimova DilnozaAD7654321AD
4Tursunov JavohirAC0034512AC
5Yusupova MalikaAB9081726AB
6
ГотовоКоличество: 4

Example: the region from a number plate

The first two digits of an Uzbek number plate are the region code: 01 — Tashkent city, 10 — Tashkent region, 30 — Samarkand, 80 — Bukhara. LEFT extracts the code, and VLOOKUP finds the region name for it:

=ВПР(ЛЕВСИМВ(A2;2);$E$2:$F$5;2;ЛОЖЬ)

Watch out: LEFT returns text (“01”). So the codes in the lookup table must be text too — typed as '01 or in a column formatted as Text. Otherwise Excel turns 01 into the number 1 and VLOOKUP returns #N/A.

Книга1 - Excel
—☐✕
C3fx=ВПР(B3;$E$2:$F$5;2;ЛОЖЬ)
ABCDEFG
1PlateCodeRegionCodeRegion
201 A 777 AA01Tashkent city01Tashkent city
330 K 245 BA30Samarkand10Tashkent reg.
480 M 512 DA80Bukhara30Samarkand
510 S 908 CB10Tashkent reg.80Bukhara
6
Готово
The codes in column B and in column E are both text (left-aligned) — that’s why VLOOKUP can match them

Up to a delimiter: LEFT + FIND

Surnames have different lengths: “Karimov” is 7 characters, “Rahimova” is 8. A fixed number won’t work. The fix: find the position of the space with FIND and give LEFT one character less:

=ЛЕВСИМВ(A2;НАЙТИ(" ";A2)-1)

In “Karimov Aziz” the space is at position 8, so LEFT takes 7 characters — “Karimov”. The -1 keeps the space itself out of the result. The same trick takes the part of “TSH-0147” before the hyphen: =ЛЕВСИМВ(A2;НАЙТИ("-";A2)-1).

Книга1 - Excel
—☐✕
C3fx=ЛЕВСИМВ(A3;B3-1)
ABCD
1Full nameSpace atSurname
2Karimov Aziz8Karimov
3Rahimova Dilnoza9Rahimova
4Tursunov Javohir9Tursunov
5Yusupova Malika9Yusupova
6
Готово
Helper column B shows the logic. In the final formula they merge: =LEFT(A2,FIND(" ",A2)-1)
Книга1 - Excel
—☐✕
B2fx=ЛЕВСИМВ(A2;2)
ABCD
1DateLEFT(A,2)The right way
201.01.2025451
301.03.2025451
4
5
Готово
The trap: the date hides the number 45658, so LEFT takes “45”. Use DAY, MONTH and YEAR for date parts

Pro level: trimming the end and quick alternatives

  • Drop the last N characters. LEFT + LEN: =ЛЕВСИМВ(A2;ДЛСТР(A2)-4) turns “Report.pdf” into “Report” (the 4 characters “.pdf” are cut off).
  • Checking a prefix. =ЕСЛИ(ЛЕВСИМВ(B2;3)="TSH";"Tashkent";"Region") groups by the start of a code. In COUNTIF a wildcard is handier: =СЧЁТЕСЛИ(B2:B100;"AB*") counts AB-series passports.
  • Need text from a date? Convert it with TEXT first: =ЛЕВСИМВ(ТЕКСТ(A2;"dd.mm.yyyy");2). Note that format codes are localized — in Russian Excel it is “ДД.ММ.ГГГГ”.
  • Flash Fill. For a one-off job, type the result in the first cell by hand and press Ctrl + E — Excel fills in the rest (no formulas).
  • Excel 365: =ТЕКСТДО(A2;" ") returns the part before the space, no FIND needed.

Try it in the simulator

Type =ЛЕВСИМВ(A2;НАЙТИ(" ";A2)-1) in C2 and fill it down to C5 to get the surnames. Then type =ЛЕВСИМВ(B2;2) in D2 to extract the passport series, and fill it down.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1Full namePassportSurnameSeries
2Karimov AzizAB1234567
3Rahimova DilnozaAD7654321
4Tursunov JavohirAC0034512
5Yusupova MalikaAB9081726
6
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

104 / 154