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.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | @ position | Login | ||
| 2 | aziz.karimov@mail.uz | 13 | aziz.karimov | |
| 3 | dilnoza@gmail.com | 8 | dilnoza | |
| 4 | javohir.t@excellab.uz | 10 | javohir.t | |
| 5 | malika99@inbox.uz | 9 | malika99 | |
| 6 |
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).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Text | FIND “t” | SEARCH “t” | |
| 2 | Tashkent | 8 | 1 | |
| 3 | Termez | #VALUE! | 1 | |
| 4 | Andijan district | 12 | 12 | |
| 5 |
Writing FIND — step by step
1
Select the result cell (B2) and click Формулы → Текстовые → FIND.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | @ position | |||
| 2 | aziz.karimov@mail.uz | 1 | ||
| 3 | dilnoza@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.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | @ position | |||
| 2 | aziz.karimov@mail.uz | 13 | ||
| 3 | dilnoza@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.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | @ position | Login | ||
| 2 | aziz.karimov@mail.uz | 13 | aziz.karimov2 | |
| 3 | dilnoza@gmail.com | 8 | dilnoza | |
| 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).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Full name | Surname | First name | |
| 2 | Karimov Aziz | Karimov | Aziz | |
| 3 | Rahimova Dilnoza | Rahimova | Dilnoza | |
| 4 | Toshmatov Javohir | Toshmatov | Javohir | |
| 5 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order comment | With SEARCH | With FIND | |
| 2 | Urgent! Deliver today | Yes | No | |
| 3 | regular order | No | No | |
| 4 | URGENT, 2 pcs | Yes | No | |
| 5 | please, urgent | Yes | Yes | |
| 6 |
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | 1st dash | 2nd dash | Region | |
| 2 | UZ-TSH-0125 | 3 | 7 | TSH | |
| 3 | UZ-SAMQ-0342 | 3 | 8 | SAMQ | |
| 4 | KZ-ALA-1007 | 3 | 7 | ALA | |
| 5 | UZ-NAMANGAN-88 | 3 | 12 | NAMANGAN | |
| 6 |
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.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | @ position | Login | ||||||||||||||||||||||
| 2 | aziz.karimov@mail.uz | |||||||||||||||||||||||
| 3 | dilnoza@gmail.com | |||||||||||||||||||||||
| 4 | javohir.t@excellab.uz | |||||||||||||||||||||||
| 5 | malika99@inbox.uz | |||||||||||||||||||||||
| 6 | ||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.