找到数组的子字符串时打印文本

时间:2016-12-06 09:08:55

标签: google-sheets

对于Col-D和Col-E中Col-A的子串匹配,是否有任何公式可以生成Col-B?

参考

var c1 = Ext.get("content1").innerHtml;

预期产出

+------------+--------+
|   Col-D    | Col-E  |
+------------+--------+
| MCDONALD   | QOO10  |
| BURGERKING | AMAZON |
+------------+--------+

1 个答案:

答案 0 :(得分:2)

试试这个公式:

=ArrayFormula(if(REGEXMATCH(A2:A,JOIN("|",FILTER(D2:D,D2:D<>""))),"DINING", if(REGEXMATCH(A2:A,JOIN("|",FILTER(E2:E,E2:E<>""))),"SHOPPING","OTHER")))

enter image description here

参考文献: