在过滤器公式中使用 Unique

Use Unique in a Filter formula

我有一个标识符列表和自动填充的每个标识符的值。
我想 filter list 所以我只会得到唯一的标识符和它们各自的值。
例如“Dana”可以出现 3 次,但在过滤后 table 我只想看到一次名称(和值)。
理想情况下,我想使用类似 =filter(a:b,unique(a:a) 这显然行不通。

如前所述,列表会自动更新,因此需要拖动的公式不会起作用。

注意:可以通过从col A中提取uniques来解决

=unique(A:A)

然后是 Arrayformula + vLookup

=arrayformula(if(I1:I>0,vlookup(I1:I,A:B,2,0),""))

但我很好奇是否可以使用 Filter 来更优雅地解决它。

举个例子(包括我提到的解决方案): https://docs.google.com/spreadsheets/d/1heKdV3U6mdGYkHCIWkeUyqo6AfhgV7ItSmolibH7ecU/edit?usp=sharing

请使用以下内容

=UNIQUE(A:B)


更新

关注 OP

Nice fix! Out of curiosity - is it possible to still use it with the filter function (for example, if I wanted to filter by Col B or add other restrictions) ?

当然可以。试试这些

=UNIQUE(FILTER(A:B,B:B=333))

=FILTER(UNIQUE(A:B),UNIQUE(B:B)=333)

参考: