Excel Guru's. Find ...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Excel Guru's. Find certain words in cells?

5 Posts
6 Users
0 Reactions
53 Views
 benz
Posts: 1143
Free Member
Topic starter
 

I got help on here before, but cannot remember...

On a spreadsheet, I have cells which contain descriptions. I would like to identify whether, for example, cell A1 contains the words "Subscription", "Licence", "Software" amongst a string of other words.

How best to do this using a specific formula folks?

Thanks in advance.


 
Posted : 30/08/2021 3:13 pm
Posts: 3362
Full Member
 

Conditional Formatting is what you're after.

This might do what you want...

Select "Conditional Formatting" from the ribbon at the top then "Highlight Cells Rules" then "Text that contains"

Highlight Cells Containing Specific Text with Conditional Formatting (skyneel.com)


 
Posted : 30/08/2021 4:07 pm
 poly
Posts: 8748
Free Member
 

or if trying to do it with a formula:

=find("Software",A1)

if it contains Software it will return the position where it starts (so 'Software License' returns 1 and 'Free Software' returns 6). If its not there it returns a #VALUE error, so you can combine with iferror:

=iferror(find("Software,A1),"Not S/ware")


 
Posted : 30/08/2021 5:19 pm
Posts: 10854
Full Member
 

Or to make the output from polys suggestion a bit more readable

=If(iserror(find ("text", A1), "No", "Yes")


 
Posted : 30/08/2021 6:00 pm
Posts: 6332
Free Member
 

Note that FIND is case sensitive. If you want it not case sensitive then use the SEARCH function.

=IF(ISERROR(SEARCH("software",A1)),"No","Yes")

If you want to look for multiple targets (and disappear down the rabbit hole) then:

=IF(SUMPRODUCT(- -ISNUMBER(SEARCH({"software","licence","subscription"},A1)))=0,"No","Yes")

[Note: the two characters before ISNUMBER are two minus symbols. This converts TRUE and FALSE values into 1s and 0s]


 
Posted : 01/09/2021 9:23 am
Posts: 113
Full Member
 

If none of the solutions above work for you, then please PM me and I can write some code to do the job.


 
Posted : 01/09/2021 5:10 pm