Wednesday 21 August 2019

Finding Text in Multiple Columns

Dear Friends,

Sometimes we have to search for text in multiple columns. In this topic, we will learn to search for text and if you get the text, then display "Yes" in the cell or else display "No".To get this result, I have two Excel functions which are IF() and Countif().

IF(): Tests a user-defined condition and returns one result if the condition is TRUE, and another result if the condition is FALSE.

COUNTIF(): The Excel Countif function returns the number of cells within a supplied range, that satisfy given criteria.

In my example, I have entered different sentences from column A1 to E1.


Now I want to search a text "Gardner" in column A1 to E1. The formula I am using is

=IF(COUNTIF(A1:E1,"*Gardner")>0,"Yes","No")


Here I am using a wild card "*" to find the result that is less than exact. To know more about wildcards follow the topic use of wildcards in excel.

You can get the result by editing as per your data set range and text.







No comments:

Post a Comment