Find a specific word in a comment with a formula in an excel report
In some of my reports, I need to find a particular word which is hidden into many comments, it can be in a cell, in a row and/or in a column.
When I use the formula ?
When I need to find a word into huge comments.
How to use the formula ?
The formula in this topic is with "," so depending of the operating system of your PC, the formula should have ";" instead of ",".
How is/are the formula(s) ?
=IF()
=SEARCH()
=IFERROR()
=COUNTIF()
=COUNTIFS()
To look into a specific cell:
=IF(SEARCH("*chocolate*",A2,1),"yes")
It will look into the cell A2 and if it finds the word “chocolate” in the comment, it will display “yes”.
To look into a specific column:
=IF(COUNTIF(A:A,"*chocolate*"),"yes","no")
To search with 2 words or more, I will use this formula:
=IF(COUNTIFS(A:A,"*chocolate*",B:B,"*white*"),"yes","no")
If you are using a cell reference instead of the word:
=IF(COUNTIF(A:A,"*"&Z2&"*"),"yes","no")
The cell Z2 is “chocolate”. And ff you get an error like that #VALUE!, use the =IFERROR() function:
=IFERROR(IF(SEARCH("*chocolate*",A2,1),"yes"),"no")
Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...