2

Link here to spreadsheet

As the title says, how can I end up with cells that don't match in value, the difference/complement (set theory)?

I would prefer it with only FUNCTIONS and no script.

{1,2,3,4}\{1,3} = {2, 4}

or with letters

{a,b,c,d}\{a,c} = {b, d}

or with with space.

{xyz zyx, abc cba, qwe ewq}\{xyz zyx, qwe ewq} = {abc cba}
4

2 回答 2

2

您可以在结果列的顶部添加一个公式,如下所示:

=arrayformula(if(B2:B=A2:A,,A2:A))
于 2016-02-18T14:26:29.227 回答
2

有两个数组:

Array1  Array2
  1       1
  2       b
  b 
  4 
  c 

你可以得到结果数组:

Result
  2
  4
  c

试试这个公式:

=FILTER(A2:A6,ROUND(MMULT(ArrayFormula(--(A2:A6<>TRANSPOSE(B2:B4))),TRANSPOSE(SPLIT(REPT(1/ROWS(B2:B4)&"/",Rows(B2:B4)),"/"))),5)=1)

这个任务可能太复杂了,有人可以编辑它吗?请看样张


编辑

我找到了更简单的方法来做到这一点,使用正则表达式:

=FILTER(A2:A6,REGEXMATCH(ARRAYFORMULA("'"&A2:A6),JOIN("|",B2:B3))=false)
于 2016-02-18T14:21:29.633 回答