FIND and SEARCH Functions in Excel: Locate Text Positions and Build Dynamic Formulas

FIND and Search Function in Excel feature image for tutorial blog
Learn how to use FIND and SEARCH in Excel to locate character positions, split text dynamically, check if cells contain keywords, and handle missing delimiters with IFERROR.

Many text formulas depend on knowing exactly where a character or word appears inside a string. The FIND and SEARCH functions solve this — both return the character position of one text string within another. For example, FIND("@", "sarah@company.com") returns 6 because the "@" sits at position 6. You can then feed that number into LEFT, RIGHT, or MID to extract exactly what you need. Additionally, these functions power conditional checks, data validation, and dynamic extraction across every Excel version.

Availability: FIND and SEARCH work in every Excel version from Excel 2000 onwards, including Microsoft 365, Excel 2024, 2021, 2019, and 2016.

What Is the Syntax for FIND and SEARCH?

Both functions share the same three arguments. The only differences are in how they treat case and wildcards.

=FIND (find_text, within_text, [start_num]) =SEARCH(find_text, within_text, [start_num])
ArgumentRequired?What it does
find_text Required The character or substring you want to locate. Can be typed directly in quotes or referenced from a cell.
within_text Required The full string to search inside. Usually a cell reference, but can also be a text value in quotes.
start_num Optional The character position to begin searching from. Defaults to 1 (the first character). Use this to skip a known prefix or to find a second occurrence.

How Do FIND and SEARCH Differ?

At first glance, the two functions look identical. However, two key differences determine which one to choose for a given task.

FeatureFINDSEARCH
Case sensitivity Case-sensitive. "apple" and "Apple" are different. Case-insensitive. "apple" and "APPLE" match equally.
Wildcard support No wildcards. Characters are matched literally. Supports ? (any single character) and * (any sequence).
Best used for Exact, case-sensitive matching — e.g. locating "ID:" not "id:" General text search where case varies — e.g. finding "@" in emails
Error when not found #VALUE! #VALUE!
Available in All versions from Excel 2000 All versions from Excel 2000
Quick rule: Use SEARCH for most everyday text extraction tasks — it is more forgiving with capitalisation. Use FIND only when the exact case of the character matters, for example when distinguishing product codes that use uppercase letters as part of their meaning.

Example 1: Find a Character's Position in a String

Both functions return an integer representing the position of the first matching character. Understanding this output is essential before combining either function with LEFT, RIGHT, or MID. The visual below shows how positions count from left to right, starting at 1.

1
Locate "@" in an email address — position counting from character 1
String: "sarah@company.com"
s1
a2
r3
a4
h5
@6 ★
c7
o8
m9
p10
11+
Basic: find "@" in A2 — returns its character position: =FIND("@", A2) → 6 (for "sarah@company.com") =SEARCH("@", A2) → 6 (same result — "@" has no case) Find the hyphen in a product code: =FIND("-", A2) → 4 for "PRD-2026" Find a space — useful for name splitting: =FIND(" ", A2) → position of the first space in A2 Case-sensitive — FIND distinguishes "ID" from "id": =FIND("ID", A2) → position of "ID" (uppercase only) =SEARCH("id", A2) → finds "ID", "Id", or "id" (any case)
Both functions return the same integer for delimiters like "@", "-", and " " because those characters have no case. Consequently, most everyday text extraction tasks work equally well with either function.

Example 2: Dynamic Text Extraction with LEFT and RIGHT

The real power of FIND and SEARCH comes when you nest them inside LEFT or RIGHT. Instead of hardcoding a character count, you let the function measure the delimiter position dynamically. As a result, the formula adapts to strings of any length.

2
Extract username and domain from email addresses of any length
A — Email
B — Username
C — Domain
sarah@excelguru.io
sarah
excelguru.io
james.kirk@company.co.uk
james.kirk
company.co.uk
Username — everything to the LEFT of "@": FIND("@",A2) gives the "@" position; minus 1 excludes it. =LEFT(A2, =FIND("@", A2) - 1) Domain — everything to the RIGHT of "@": LEN minus "@" position gives the remaining characters. =RIGHT(A2, LEN(A2) - =FIND("@", A2)) Same pattern for any delimiter — replace "@" with "-", "/", or ",": =LEFT(A2, =FIND("-", A2) - 1) =RIGHT(A2, LEN(A2) - =FIND("-", A2))

Example 3: Use start_num to Find the Second Occurrence

By default, FIND and SEARCH locate the first occurrence of a character. However, you can start the search from a position past the first match by using the start_num argument. This technique lets you locate the second, third, or any subsequent occurrence of a delimiter.

How Does start_num Work?

You first find the position of the first occurrence. Then you pass that position plus 1 as the start_num of a second FIND. Excel consequently skips everything up to that point and searches the rest of the string. The result is still measured from character 1 of the original string.

3
Extract the middle segment between two hyphens using nested FIND
A — Code
p1 (1st "-")
p2 (2nd "-")
B — Middle
PRD-EMEA-2026
4
9
EMEA
SVC-US-2025
4
7
US
p1 = position of first "-": =FIND("-", A2) → 4 for "PRD-EMEA-2026" p2 = position of second "-" (start searching after p1): =FIND("-", A2, =FIND("-", A2) + 1) → 9 MID extracts what is between the two hyphens: Start = p1+1 | Length = p2-p1-1 =MID(A2, =FIND("-", A2) + 1, =FIND("-", A2, =FIND("-", A2) + 1) - =FIND("-", A2) - 1) → "EMEA" (4 chars) or "US" (2 chars) — adapts to any middle length
Find the Nth occurrence — repeat the nesting: To find a third hyphen, nest a third FIND using the position of the second as its start_num. Each level simply adds FIND("-", A2, prev_pos + 1). Alternatively, SUBSTITUTE can replace the Nth occurrence with a unique marker, then FIND locates that marker in one step.

Example 4: Check Whether a String Contains a Substring

FIND and SEARCH return #VALUE! when the search text is missing. You can turn this error-or-number behaviour into a TRUE/FALSE check by wrapping the result in ISNUMBER. This pattern is widely used for conditional labelling, filtering flags, and data validation.

4
Flag cells that contain a keyword — build a "contains" test
A — Note
B — Contains "urgent"?
C — Label
D — Count
Urgent: review contract
TRUE
Urgent
Send invoice to client
FALSE
Normal
ISNUMBER turns the SEARCH result into TRUE or FALSE. If "urgent" is found, SEARCH returns a number → ISNUMBER → TRUE. If not found, SEARCH returns #VALUE! → ISNUMBER → FALSE. Contains check — case-insensitive (most common): =ISNUMBER(=SEARCH("urgent", A2)) Label based on keyword presence: =IF(ISNUMBER(=SEARCH("urgent", A2)), "Urgent", "Normal") Count cells containing "urgent" across a range: =SUMPRODUCT(--ISNUMBER(=SEARCH("urgent", A2:A100))) Case-sensitive version — only flags "URGENT", not "urgent": =ISNUMBER(=FIND("URGENT", A2))
ISNUMBER(SEARCH(...)) is the standard "contains" test in Excel. It works in all versions without array entry. COUNTIF with a wildcard — =COUNTIF(A2,"*urgent*") — is simpler for single-cell checks, but ISNUMBER(SEARCH(...)) is more flexible inside complex formulas.

Example 5: Use Wildcards with SEARCH

SEARCH supports two wildcard characters that FIND does not. A question mark (?) matches exactly one character of any kind. An asterisk (*) matches any sequence of characters, including zero characters. These wildcards make SEARCH especially useful when you know the pattern of a substring but not its exact value.

Wildcard Examples with SEARCH

For instance, searching for "V?" finds "V1", "V2", "VA", or any two-character sequence beginning with V. Similarly, searching for "ver*ion" finds "version", "verification", or any word that starts with "ver" and ends with "ion". This flexibility is particularly useful for matching product version codes and reference numbers.

5
Match product version codes and partial patterns using wildcards
A — String
SEARCH pattern
Result
Excel V2 released
"V?"
7
Microsoft Corporation
"micro*soft"
1
PRD-cat~hat-2026
"~?"
literal "?"
? — matches any single character: Finds "V1", "V2", "VA", "VX" — any two-char sequence starting with V =SEARCH("V?", A2) * — matches any sequence of characters: Finds "Microsoft", "micro-soft", "Micro Soft" — anything between micro and soft =SEARCH("micro*soft", A2) Check if cell contains any word starting with "excel": Returns TRUE for "Excel", "excellence", "EXCEL 365" etc. =ISNUMBER(=SEARCH("excel*", A2)) To search for a literal ? or * (not as wildcards), prefix with ~: =SEARCH("~?", A2) finds a real question mark =SEARCH("~*", A2) finds a real asterisk

Example 6: Handle Missing Delimiters with IFERROR

Both functions throw #VALUE! when the search text does not exist in the string. This breaks formulas across an entire column if even one row has missing or inconsistent data. Therefore, always wrap FIND and SEARCH in IFERROR when working with real-world datasets where the delimiter may be absent.

6
Protect extraction formulas against missing delimiters using IFERROR
A — Input
Without IFERROR
With IFERROR
sarah@excelguru.io
sarah
sarah
no-email-here
#VALUE!
no-email-here
(blank)
#VALUE!
(blank)
Without protection — breaks if "@" is missing: =LEFT(A2, =FIND("@", A2) - 1) IFERROR returns original text when "@" is not found: =IFERROR( LEFT(A2, =FIND("@", A2) - 1), A2 ) IFERROR with a blank fallback — returns empty when not found: =IFERROR( LEFT(A2, =FIND("@", A2) - 1), "" ) Contains check with graceful FALSE on error — no IFERROR needed: ISNUMBER already returns FALSE for #VALUE! errors. =ISNUMBER(=SEARCH("@", A2))
ISNUMBER needs no IFERROR: When using the ISNUMBER(SEARCH(...)) pattern for a contains check, IFERROR is unnecessary. ISNUMBER already converts #VALUE! errors to FALSE automatically. However, for LEFT, RIGHT, and MID formulas, IFERROR is always worth adding.

How to Fix Common FIND and SEARCH Errors

#VALUE! error

Either the search text does not exist in the string, or start_num is invalid (less than 1 or greater than the string length). To diagnose the issue, test the formula in an empty cell with a known string. If the delimiter is sometimes missing, wrap the formula in IFERROR as shown in Example 6.

Wrong position returned — off by one

Check whether extra spaces appear before or after the text. FIND and SEARCH count spaces as characters, so a leading space shifts every position by 1. Wrap within_text in TRIM to clean the string first: =FIND("-", TRIM(A2)). This removes leading, trailing, and duplicate internal spaces.

FIND returns a position but the wrong one

By default, both functions return the first occurrence. If your string has multiple delimiters and you need the second or third, use the start_num argument as shown in Example 3. Alternatively, SUBSTITUTE combined with FIND offers a compact way to locate any Nth occurrence.

FIND does not support wildcards: Passing "?" or "*" into FIND treats them as literal characters, not wildcards. If your search text contains either character and you intend to match it literally, use FIND rather than SEARCH. For wildcard matching, switch to SEARCH and use the ~ escape character before any literal ? or *.

Frequently Asked Questions

  • What is the difference between FIND and SEARCH in Excel?+
    FIND is case-sensitive and does not support wildcards. SEARCH is case-insensitive and supports the ? and * wildcard characters. For most everyday text extraction — splitting emails, splitting names, locating delimiters — SEARCH is the better choice because it handles inconsistent capitalisation without errors. Use FIND specifically when the exact case of the character matters.
  • What does FIND return if the text is not found?+
    Both FIND and SEARCH return a #VALUE! error when the search text does not exist in the string. To handle this gracefully, wrap the formula in IFERROR: =IFERROR(FIND("@",A2), 0) returns 0 when "@" is missing instead of showing an error. Alternatively, use ISNUMBER(FIND(...)) to get a TRUE/FALSE result — ISNUMBER automatically converts errors to FALSE.
  • How do I find the second occurrence of a character?+
    Use the start_num argument to skip past the first match. First find the position of the first occurrence, then add 1 and pass that as start_num to a second FIND: =FIND("-", A2, FIND("-", A2) + 1). This finds the second hyphen in A2. Repeat the nesting to find the third, fourth, and so on.

More Questions About FIND and SEARCH

  • Does SEARCH support wildcards?+
    Yes, SEARCH supports two wildcard characters. A question mark (?) matches exactly one character of any kind. An asterisk (*) matches any sequence of characters, including zero. FIND, by contrast, does not support wildcards at all. To search for a literal question mark or asterisk with SEARCH, prefix the character with a tilde (~): use "~?" to find a real question mark.
  • How do I check if a cell contains a specific word?+
    Wrap SEARCH inside ISNUMBER: =ISNUMBER(SEARCH("word",A2)). This returns TRUE if "word" appears anywhere in A2 (case-insensitive), or FALSE if it does not. No IFERROR is needed because ISNUMBER converts errors to FALSE automatically. For a case-sensitive check, replace SEARCH with FIND.
  • Which Excel versions support FIND and SEARCH?+
    Both functions are available in every Excel version from Excel 2000 onwards, including Microsoft 365, Excel 2024, 2021, 2019, 2016, 2013, 2010, 2007, and earlier. They also work in Excel for the web and Google Sheets. No special version, add-in, or setting is needed.