Excel tutorial
/

Functions

Intermediate

Excel FIND and SEARCH: locate a character’s position in text

FIND and SEARCH return the position of a character or word in text. Case sensitivity, the #VALUE! error and splitting text with LEFT/MID — with examples.

FIND and SEARCH answer a single question: at which position does the character or word appear in the text? In “aziz.karimov@mail.uz” the @ sign is 13th — so the login is the first 12 characters.

On its own the number is rarely useful. Combined with LEFT, MID and RIGHT, it becomes the key to splitting text: separating surname and first name, pulling the login out of an email, cutting the region code out of a product code, checking whether a comment mentions a word.

Книга1 - Excel
—☐✕
B2fx=НАЙТИ("@";A2)
ABCD
1Email@ positionLogin
2aziz.karimov@mail.uz13aziz.karimov
3dilnoza@gmail.com8dilnoza
4javohir.t@excellab.uz10javohir.t
5malika99@inbox.uz9malika99
6
Готово
FIND locates the @ sign, LEFT cuts off everything before it

Syntax

=НАЙТИ(find_text; within_text; [start_num])
=ПОИСК(find_text; within_text; [start_num])

  • find_text — what to look for: "@", " " (a space), "Tashkent".
  • within_text — where to look: usually a cell such as A2.
  • start_num — optional. The character to start searching from. Omitted means 1 (the beginning).

The result is the position of the first match, counted from the start of the text. If nothing is found you get #VALUE!.

There are only two differences, but both matter:

  • FIND is case-sensitive: “T” and “t” are different characters. * and ? are searched for literally.
  • SEARCH ignores case and understands the wildcards ? (any single character) and * (any run of characters).
Книга1 - Excel
—☐✕
B3fx=НАЙТИ("t";A3)
ABCD
1TextFIND “t”SEARCH “t”
2Tashkent81
3Termez#VALUE!1
4Andijan district1212
5
Готово
FIND looks for a lowercase “t”: in “Tashkent” it is only at the end (8), in “Termez” there is none. SEARCH treats T and t the same

Writing FIND — step by step

1

Select the result cell (B2) and click Формулы → Текстовые → FIND.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
B2fx
ABCD
1Email@ position
2aziz.karimov@mail.uz1
3dilnoza@gmail.com
4
5
Готово

2

In the dialog type "@" into Find_text and A2 into Within_text. Leave Start_num empty so the search starts at the beginning. Click OK.

Книга1 - Excel
—☐✕
B2fx=НАЙТИ("@";A2)
ABCD
1Email@ position
2aziz.karimov@mail.uz13
3dilnoza@gmail.com
4
5
Готово

3

Fill the formula down. Now put the number to work: in the next column type =ЛЕВСИМВ(A2;B2-1) — every character before the @, i.e. the login.

Книга1 - Excel
—☐✕
C2fx=ЛЕВСИМВ(A2;B2-1)
ABCD
1Email@ positionLogin
2aziz.karimov@mail.uz13aziz.karimov2
3dilnoza@gmail.com8dilnoza
4
5
Готово

Practical examples

Three real tasks: splitting a full name (beginner), checking whether a comment contains a word (intermediate) and finding the second separator inside a code (advanced).

Книга1 - Excel
—☐✕
B2fx=ЛЕВСИМВ(A2;НАЙТИ(" ";A2)-1)
ABCD
1Full nameSurnameFirst name
2Karimov AzizKarimovAziz
3Rahimova DilnozaRahimovaDilnoza
4Toshmatov JavohirToshmatovJavohir
5
Готово
Example 1: find the space. Everything before it is the surname, everything after it is the first name (100 means “to the end”)
Книга1 - Excel
—☐✕
B2fx=ЕСЛИ(ЕЧИСЛО(ПОИСК("urgent";A2));"Yes";"No")
ABCD
1Order commentWith SEARCHWith FIND
2Urgent! Deliver todayYesNo
3regular orderNoNo
4URGENT, 2 pcsYesNo
5please, urgentYesYes
6
Готово
Example 2: ISNUMBER(SEARCH(…)) asks “does the text contain this word?”. FIND missed “Urgent” and “URGENT”
Книга1 - Excel
—☐✕
C2fx=НАЙТИ("-";A2;B2+1)
ABCDE
1Code1st dash2nd dashRegion
2UZ-TSH-012537TSH
3UZ-SAMQ-034238SAMQ
4KZ-ALA-100737ALA
5UZ-NAMANGAN-88312NAMANGAN
6
Готово
Example 3: to find the second dash, start searching right after the first one (B2+1). The part between them is the region, whatever its length

Pro level: “contains” conditions and the last space

  • In conditional formatting. Highlight rows whose comment mentions “urgent”: Условное форматирование → New Rule → “Use a formula…” → =ЕЧИСЛО(ПОИСК("urgent";$A2)).
  • Counting needs no helper formula. =СЧЁТЕСЛИ(A2:A100;"*urgent*") counts the matching rows right away — also case-insensitive.
  • Wildcard search. =ПОИСК("a?iz";A2) finds both “Aziz” and “Abiz”: ? stands for any single character.
  • Finding the last space. FIND only finds the first one. To find the last, replace the last space with a unique character: =НАЙТИ("|";ПОДСТАВИТЬ(A2;" ";"|";ДЛСТР(A2)-ДЛСТР(ПОДСТАВИТЬ(A2;" ";"")))). In “Karimov Aziz Anvarovich” it finds the space before the patronymic.
  • In Microsoft 365 =ТЕКСТДО(A2;"@") and =ТЕКСТПОСЛЕ(A2;"@") replace the LEFT+FIND combo with a single function. You still need the FIND technique for older versions.

Try it in the simulator

Type =НАЙТИ("@";A2) in B2 and fill it down to B5. Then type =ЛЕВСИМВ(A2;B2-1) in C2 and fill it down too — each email should give you its login.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1Email@ positionLogin
2aziz.karimov@mail.uz
3dilnoza@gmail.com
4javohir.t@excellab.uz
5malika99@inbox.uz
6
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

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

Support us
Previous

108 / 154