Forum Discussion
Lucascobar
Aug 24, 2021Copper Contributor
HOW TO: "If cell contains specific text then return specific text"
If I have a list of things, and I want to have the return from another list if it contains certain keywords.
In the appendix of file, the column A is the original list, and I want to have it return "good" in B2 if A2 contains "apple", and return "nice" in B3 if A3 contains "help". Just to search if contains words in column E will return the result in column F.
I noticed from similar questions that I could repeatedly using the if formula to accomplish the goal, but just wondering if have better and neat way to reach the purpose?
=IF(ISNUMBER(SEARCH("Apple",A2,1)),"good",
IF(ISNUMBER(SEARCH("help",A2,1)),"nice",
IF(ISNUMBER(SEARCH("water",A2,1)),"better",
"no match")))
=FILTER($F$3:$F$5,ISNUMBER(SEARCH($E$3:$E$5,A2)))
- RyanOWCopper Contributor
Brilliant ! This helped so much!
Just wanted to say a huge thank you for this! 🙂just what I was looking for, which i couldn't seem to find anywhere else!
Saved me a lot of time!
RyanOW , you are welcome
- LucascobarCopper ContributorThanks for the quick solution!!
- Detlef_LewinSilver Contributor
=FILTER($F$3:$F$5,ISNUMBER(SEARCH($E$3:$E$5,A2)))
- LucascobarCopper ContributorVery helpful, thanks so much!