Forum Discussion
JelHew
Jan 03, 2023Copper Contributor
Need to find multiple search terms within my spreadsheet
Hello, I would like to write a code to find if any terms from my list (typed in column B) are found in column A. Column A Susan Prair Chalk Railroad Troublsom Waters Liszet...
- Jan 03, 2023
This may work for you. SEARCH is not used because of the potential for false positives (e.g. "USA" would be found in "Susan", etc.).
=IF(SUM(IFERROR(FIND(terms,A2),0))<>0,"A term is present","")
Patrick2788
Jan 03, 2023Silver Contributor
This may work for you. SEARCH is not used because of the potential for false positives (e.g. "USA" would be found in "Susan", etc.).
=IF(SUM(IFERROR(FIND(terms,A2),0))<>0,"A term is present","")
- JelHewJan 04, 2023Copper ContributorPatrick2788 Yes!! I am amazed you understood what I meant (even picked up on my Susan/USA issue! This is exactly what I need.
So let's say Column A is the content, Column B will say "term is present/blank", and column C I will put my list of words.
The code in cell B2 will be: =IF(SUM(IFERROR(FIND(C:C,A2),0))<>0,"A term is present","") ?? Thank you so much!- Patrick2788Jan 04, 2023Silver ContributorGlad it works for you. You are welcome!
- JelHewJan 15, 2023Copper ContributorPatrick2788
I think I might be a little off ..
So if Column A is the content
Column B will say "term is present/blank"
Column C I will put my list of words to search
Then the code in cell B2 will be: =IF(SUM(IFERROR(FIND(C:C,A2),0))<>0,"A term is present","")
Does this look correct??