Forum Discussion
learner1234
Aug 24, 2022Copper Contributor
Finding Text in Arrays, combining 2 arrays
Hello, I would like to simplify the following function: =IF(OR(--(COUNTIF(A2:E2;"*text1*")>0);--(COUNTIF(A2:E2;"*text2*")>0));"Yes";"No") Goal: OR function that refers to an array with *t...
Riny_van_Eekelen
Aug 24, 2022Platinum Contributor
learner1234 You could certainly shorten it.
=IF(COUNTIF(A2:E2;"*text1*")+COUNTIF(A2:E2;"*text2*");"Yes";"No")
In case you ever need to expand the formula with more text matches, perhaps this one is a bit easier to maintain:
=IF(SUM(IFERROR(FIND({"text1";"text2"};A2:E2),0));"Yes","No")