Check if a cell contains text (case-insensitive)
Let's say you want to ensure that a column contains text and not numbers or you want to find all orders by a particular salesperson. There are several ways to check if a cell contains text but the case of the text doesn't matter to you.
You can also use a filter to find text. For more information, see Filter data.What do you want to do?
Check if a cell has any text in it
Check if a cell matches specific text
Check if part of a cell matches specific text
Find cells that contain text
- Select the range of cells that you want to search.
If you want to search the entire worksheet, click any cell.
- On the
Hometab, in theEditinggroup, clickFind & Select, and then clickFind. - In the
Find whatbox, enter the text or numbers that you want to search for or choose a recent search from theFind whatdrop-down box.Note You can use wildcard characters in your search criteria.
-
If you want to specify a format for your search, click
Formatand make your selections in theFind Formatdialog box. - Click
Optionsto further define your search. For example, you can search for all of the cells that contain the same kind of data, such as formulas.In the
Withinbox, you can selectHomeorWorkbookto search a worksheet or an entire workbook. - Click
Find AllorFind Next.Find Alllists every occurrence of the item that you are searching for and allows you to make a cell active by selecting a specific occurrence. You can sort the results of aFind Allsearch by clicking a header.
Note To cancel a search in progress, press ESC.
Check if a cell has any text in it
To do this task, use the ISTEXT function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Note Do not select the row or column headers.
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Formulastab, in theFormula Auditinggroup, click theShow Formulasbutton.
|
|
Function details
Check if a cell matches specific text
To do this task, use the IF function. The IF function returns results that you specify based on a condition.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Note Do not select the row or column headers.
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Formulastab, in theFormula Auditinggroup, click theShow Formulasbutton.
|
|
Function details
Check if part of a cell matches specific text
To do this task, use the IF, SEARCH and ISNUMBER functions.
Note The SEARCH function is case-insensitive.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Note Do not select the row or column headers.
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Formulastab, in theFormula Auditinggroup, click theShow Formulasbutton.
|
|
Function details
![]()