This post will guide you how to return a value if a cell contains a certain number or text string in Excel. How do I check if a Cell contains specific text and then return another specific text in another cell with a formula in Excel.
Assuming that you want to check if a given Cell such as B1 contains a text string “excel”, if True, returns another text string “learning excel” in Cell C1. How to achieve it. You can use a formula based on the IF function, the ISNUMBER function and the SEARCH function to achieve the result of return a value if Cell contains a specific value. Just like this:
Type this formula into the formula box of cell C1, and then press Enter key in your keyboard.
You will see that the text string “learning excel” will be returned in the Cell C1.
And if you want to check the range of cells B1:B4, you need to drag the AutoFill Handle down to other cells to apply this formula.
- Excel SEARCH function
The Excel SEARCH function returns the number of the starting location of a substring in a text string.The syntax of the SEARCH function is as below:= SEARCH (find_text, within_text,[start_num])…
- Excel ISNUMBER function
The Excel ISNUMBER function returns TRUE if the value in a cell is a numeric value, otherwise it will return FALSE.The syntax of the ISNUMBER function is as below:= ISNUMBER (value)…
- Excel IF function
The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE.The syntax of the IF function is as below:= IF (condition, [true_value], [false_value])…