# How to check if a cell contains specific text in Excel

Combine SEARCH with ISNUMBER inside IF: =IF(ISNUMBER(SEARCH(text,cell)),"Yes","No").

**Excel:** `=IF(ISNUMBER(SEARCH($E$1,A2)),"Yes","No")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Order note | Urgent? |  | Look for | rush |
| Rush delivery please |  |  |  |  |
| Leave at front desk |  |  |  |  |
| Gift wrap, RUSH if possible |  |  |  |  |
| Call before delivering |  |  |  |  |
| No rush |  |  |  |  |
| Deliver after 5pm |  |  |  |  |

Formula in B2, filled to B7: `=IF(ISNUMBER(SEARCH($E$1,A2)),"Yes","No")`

Result: Yes; No; Yes; No; Yes; No

## How it works

SEARCH returns the position of the text when it finds it and #VALUE! when it doesn't. ISNUMBER turns that into TRUE or FALSE, and IF picks the label. SEARCH ignores case, so "RUSH" and "Rush" both match.

Notice "No rush" also says Yes: the formula checks for the text, not its meaning.

## Other ways

- `=IF(COUNTIF(A2,"*"&$E$1&"*"),"Yes","No")`: COUNTIF with wildcards returns 1 or 0, which IF treats as TRUE or FALSE.
- `=IF(ISNUMBER(FIND($E$1,A2)),"Yes","No")`: FIND is case-sensitive. (Only exact-case "rush" matches, so "Rush" and "RUSH" say No.)

## Common mistakes

- `=IF(A2="*rush*",…)` doesn't work: the = comparison doesn't understand wildcards. Only functions like COUNTIF and SEARCH do.
- Short search words match inside longer words: "art" is found in "Start".

## Questions

**How do I check for one of several words?**

Add the tests with OR: `=IF(OR(ISNUMBER(SEARCH("rush",A2)),ISNUMBER(SEARCH("urgent",A2))),"Yes","No")`.

**How do I return the cell itself instead of Yes?**

Put the cell in the value_if_true argument: `=IF(ISNUMBER(SEARCH($E$1,A2)),A2,"")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-29.

Source: https://spreadsheetpractice.com/formulas/if-cell-contains-text
