To check whether a cell contains a specific word or text string and get a clean TRUE/FALSE result, combine ISNUMBER with SEARCH in a formula like =ISNUMBER(SEARCH("apple",A2)). This returns TRUE when the text is found anywhere in the cell and FALSE when it is not. The key is that SEARCH returns a number (the starting position of the match) or an error (#VALUE!) if not found, and ISNUMBER converts that into a logical value you can use for filtering, conditional formatting, or counting.

This guide walks through the exact steps to build and use the formula, including case-insensitive matching, wildcard handling, and common pitfalls. It works in Excel for Microsoft 365, Excel 2019/2021, and Excel for Mac. Menu labels and function behavior can differ slightly by version, but the core formula is the same.

What You'll Need

  • Excel 2016 or later (desktop or Microsoft 365). The formula also works in Excel for the web and Excel for Mac.
  • A worksheet with text data in a column (e.g., product names, addresses, or notes).
  • Basic familiarity with entering formulas and copying them down a column.

Step-by-Step

  1. Open your workbook and identify the target column. For example, suppose your text is in column A starting at A2, and you want to flag rows that contain the word "apple".
  2. Click an empty cell in the same row where you want the result, such as B2.
  3. Type the formula: =ISNUMBER(SEARCH("apple",A2)). Press Enter. The cell will show TRUE if "apple" appears anywhere in A2 (including as part of a longer word like "pineapple"), and FALSE otherwise.
  4. Copy the formula down. Drag the fill handle from B2 down to the last row of your data, or double-click the fill handle to auto-fill to the end of the adjacent column.
  5. Optional: make the search term a cell reference. Instead of hardcoding "apple", put the word in a cell (e.g., D1) and use =ISNUMBER(SEARCH(D1,A2)). This lets you change the search term without editing every formula.
  6. Optional: use the result for filtering or conditional formatting. Select your data range and apply a filter (Data > Filter) on the TRUE/FALSE column, or use Home > Conditional Formatting > New Rule > Use a formula to highlight rows where the helper column is TRUE.
  7. Optional: count or sum matches. To count how many cells contain the text, use =SUMPRODUCT(--ISNUMBER(SEARCH("apple",A2:A100))). To sum values in column B where column A contains the text, use =SUMIF(A2:A100,"*apple*",B2:B100) or =SUMPRODUCT(--ISNUMBER(SEARCH("apple",A2:A100)),B2:B100).
  8. Understand case sensitivity. SEARCH is case-insensitive: it treats "Apple" and "apple" the same. If you need case-sensitive matching, use FIND instead of SEARCH: =ISNUMBER(FIND("apple",A2)).
  9. Handle wildcards. SEARCH supports wildcards: ? for any single character and * for any sequence. For example, =ISNUMBER(SEARCH("app?e",A2)) matches "apple" and "apples" but not "applesauce"? Actually, it matches any five-character string starting with "app" and ending with "e". To search for a literal question mark or asterisk, precede it with a tilde (~).
  10. Test edge cases. Check a cell that contains the search term as part of a larger word (e.g., "pineapple" contains "apple"), a cell with different case, and a cell that is empty. SEARCH on an empty cell returns #VALUE!, so ISNUMBER returns FALSE. That is usually fine, but if you want to avoid errors, wrap with IFERROR: =IFERROR(ISNUMBER(SEARCH("apple",A2)),FALSE).

Common Mistakes

  • Forgetting that SEARCH returns a position, not TRUE/FALSE. Using =SEARCH("apple",A2) alone gives a number or #VALUE!, not a logical value. Always wrap with ISNUMBER.
  • Assuming SEARCH is case-sensitive. It is not. Use FIND for case-sensitive checks.
  • Mismatched parentheses. The formula has two opening parentheses and two closing ones: =ISNUMBER(SEARCH("text",cell)). A missing parenthesis causes Excel to reject the formula.
  • Using a cell reference without locking it when copying. If you reference a search term cell (e.g., D1) and copy down, use $D$1 to keep it fixed.
  • Expecting wildcards to work in FIND. FIND does not support wildcards; only SEARCH does.
  • Searching for text that includes a wildcard character. If your search term contains * or ?, escape it with a tilde (~) or use FIND.

Tips

  • Use =ISNUMBER(SEARCH("apple",A2)) as a helper column, then hide it or place it far to the right to keep your sheet clean.
  • Combine with IF to return custom labels: =IF(ISNUMBER(SEARCH("apple",A2)),"Contains apple","No apple").
  • For multiple search terms, nest SEARCH with OR: =ISNUMBER(SEARCH("apple",A2))+ISNUMBER(SEARCH("orange",A2))>0 or use =SUMPRODUCT(--ISNUMBER(SEARCH({"apple","orange"},A2)))>0.
  • When searching for a literal asterisk or question mark, remember to escape with ~ (e.g., SEARCH("~*",A2)).
  • Use IFERROR to handle empty cells gracefully: =IFERROR(ISNUMBER(SEARCH("apple",A2)),FALSE).

Troubleshooting

If the formula returns #VALUE!, check that the cell you are searching is not empty and that the search term is a text string. If you see #NAME?, ensure you typed ISNUMBER and SEARCH correctly (no spaces). If the formula returns FALSE when you expect TRUE, verify that the search term is spelled correctly and that you are not accidentally using FIND (case-sensitive) when you meant SEARCH. If copying the formula down gives wrong results, check for absolute vs. relative references. If the formula works in one cell but not another, compare the cell references and ensure there are no hidden characters or leading/trailing spaces in the search term. Use TRIM to clean data if needed.

Frequently Asked Questions

What does ISNUMBER(SEARCH()) actually do?

SEARCH looks for one text string inside another and returns the starting position number if found, or a #VALUE! error if not. ISNUMBER then converts that number to TRUE and the error to FALSE. The combined formula gives a clean logical test for "contains text".

Is SEARCH case-sensitive?

No. SEARCH ignores case, so "Apple" and "apple" are treated the same. For case-sensitive matching, use FIND instead of SEARCH.

Can I search for multiple words at once?

Yes. You can nest multiple SEARCH functions with OR logic, or use an array constant inside SEARCH with SUMPRODUCT. For example: =SUMPRODUCT(--ISNUMBER(SEARCH({"apple","orange"},A2)))>0 returns TRUE if either word is found.

Why does my formula return #VALUE!?

This happens when SEARCH cannot find the text or when the cell being searched is empty. Wrap the formula in IFERROR to return FALSE instead: =IFERROR(ISNUMBER(SEARCH("apple",A2)),FALSE).

Can I use wildcards with SEARCH?

Yes. SEARCH supports ? (any single character) and * (any sequence). To search for a literal ? or *, precede it with a tilde (~). FIND does not support wildcards.

How do I count how many cells contain a specific word?

Use =SUMPRODUCT(--ISNUMBER(SEARCH("apple",A2:A100))). This counts cells in the range that contain "apple" anywhere.