搜索列,但排除另一列中的单词列表

时间:2018-11-19 18:10:54

标签: google-sheets array-formulas google-query-language google-sheets-formula

我有一个功能可以查看多列关键字,并在一个列表中按字母顺序列出所有唯一版本。这是我到目前为止拥有的功能:

=unique(sort(substitute(query({A2:A;B2:B}, "where Col1 <>''"),"""","")))

我在C列中也有一个关键字列表,但不想在上面的函数中列出。为此,需要在上面添加什么?

2 个答案:

答案 0 :(得分:0)

看看这是否可以解决问题:

=unique(sort(substitute(query({A2:A;B2:B}, "where Col1 <>'' and not(Col1) matches '"&TEXTJOIN("|", 1, C2:C)&"'"),"""","")))

查看数据后,使用此更新的公式

=sort(unique(query({'Search Console'!A2:A; 'SISTRIX KWs'!A2:A}, "Where not(Col1) matches '"&TEXTJOIN("|", 1, Legend!A2:A)&"'")))

这是您想要实现的目标吗?

答案 1 :(得分:0)

我想出了怎么做!最终结果是:

=sort(unique(query({'Search Console'!A2:A; 'SISTRIX KWs'!A2:A}, "Where not Col1 like '%"&TEXTJOIN("%' and not Col1 like '%", 1, Legend!A2:A)&"%'",0)))