Reputation: 35
I want to display a value in a different column if the string contains some pattern in it. For ex: asd_wer1 is a string that contains _wer pattern in it and ewr_jer is the string that contains _jer pattern. So I want to display alan next to each string which contains _wer in it, and same for _jer also.
How can I do that?
I tried using below formula but it's not working =IF(OR(ISNUMBER(SEARCH("_wer",A1)),"Alan",IF(ISNUMBER(SEARCH("_jer",A1)),"Bob","")))
I've attached the pic below for more info.
Upvotes: 0
Views: 57
Reputation: 152450
If one has the Dynamic Formula FILTER():
=@FILTER($E$1:$E$2,ISNUMBER(SEARCH($D$1:$D$2,A2)))
If not then use:
=INDEX(E:E,AGGREGATE(15,7,ROW($D$1:$D$2)/(ISNUMBER(SEARCH($D$1:$D$2,A2))),1))
Upvotes: 2