

#If then formula in excel with text how to
Follow this link How to Check if a string contains one of many texts in Excel. Use the formula: =SUMPRODUCT(-ISNUMBER(SEARCH(,A1)))>0 If we have multiple texts then we use the SUMPRODUCT function, This formula returns TRUE/FALSE as per the value found/ Not found. In the above example we lookup one given text in cells. This formula is useful wherever the database contains multiple information of a row in one cell. Copy the formula to the rest of the cells using the Ctrl + D or dragging it down from the right bottom (tiny box) of the applied cell.Īs you can see there is only one employee in "XG" department. So check only "XG" in all cells and return "Yes" if found and return "No" If not.Īs you can see First employee doesn't belong to "XG" so the formula returns "No" using the FIND function. "XG" must be exact as there are two different departments that go by "Xg". Here we need to find the department "XG" in all cells. Here we have been given a list of Employee Id information in column A and the look up department is "XG". Now we will check if all cells contain specific text. Copy the formula to the rest of the cells using the Ctrl + D or dragging it down from the right bottom (tiny box) of the applied cell.Īs you can see we found all the given department id employees using the above method. Use the formula: =ISNUMBER(SEARCH(D4,C4))Īs you can see the formula finds A B when you looked forĪB using the Search function. Here lookup text is in column D and within text is in Column C. Employee id has name, department id and particular id. Here we have some employees to look up by the given department Id. Let's understand how to use the function using an example. Note: In The above mentioned formula you can input values like YES/NO or Found/Notfound.Īll of these might be confusing to understand. Use the below formula to get the certain required result format.Ĭase insensitive formula: =IF(ISNUMBER(SEARCH(find_text,within_text)),"value_if_true",value_if_false)Ĭase sensitive formula: =IF(ISNUMBER(FIND(find_text,within_text)),"value_if_true",value_if_false) Use the IF function with formula to return YES or NO. The above formulas will return True or False. Case insensitive means formula looks for AG can return ag, Ag, AG or aG.Ĭase insensitive formula: =ISNUMBER(SEARCH(find_text,within_text)Ĭase sensitive formula: =ISNUMBER(FIND(find_text,within_text) The text you are looking for can either be exact or case insensitive. You are here at the right place to learn How to check if a cell contains specific text. I think you must have thought to do it manually but time constraint.
:max_bytes(150000):strip_icc()/entering-data-with-if-function-3123603-2-5bf19dd646e0fb00267d033b.jpg)
For example finding the department ID from a database. Identify particular text in a cell or different word in given cells.

In this article, we will learn How to look up cells having certain text and return the Certain Text in Excel.
