Forum Discussion
Justin_A
Jan 05, 2025Copper Contributor
Conditional formula based on whether a cell contains a specific string of text
I would like to create a conditional formula that would work like this: "if this cell contains the text string 'abc', then do xyz (otherwise, do nothing). This is not the same as "if the data in this cell EQUALS 'abc'"; this formula needs to work even if there is a lot of other text/words/characters besides the string 'abc'.
As far as I know now, the only conditionals that can be used in an if/then formula are =, >, or <, and that my proposed conditional "contains" doesn't exist. But I hope I'm wrong. Can what I'm proposing be done?
Use
=IF(ISNUMBER(SEARCH("abc", cell_reference)), xyz, "")
1 Reply
Use
=IF(ISNUMBER(SEARCH("abc", cell_reference)), xyz, "")