为什么按自定义公式过滤视图不适用于此检测列中第一个唯一条目的公式?

Why does filter view by custom formula NOT work for this formula that detects first unique entry in column?

在尝试回答 Cowboy's question 时,我遇到了以下 curious/frustrating 情况。

在 A 列中,我们有类似 {"";"a";"b";"a";"c";"b"}.

的内容

如果在 B 列中,我们使用公式

填充单元格
=iserror(match(A2,A:A1,0))

从第二行开始,输出将是 {"";TRUE;TRUE;FALSE;TRUE;FALSE},因为公式会检查条目是否未出现在它上面。

但是,如果我们在具有自定义公式的条件筛选器中使用此公式 - 具有正确的索引偏移量,则它不起作用。为什么?


通过正确的索引偏移量,我的意思是

Filter by condition with custom formula iterates the formula with position centered on the cell below the cell with the filter view setting.

为什么没有记录?对于 Google 支持(如果存在)来说,这可能是个好问题。

您需要应用这个公式:

=ArrayFormula(COUNTIFS(ROW(A:A),"<="&ROW(A2),A:A,A2))=1

范围:

2 a
3 b
4 a
5 c
6 b

将被过滤到每个值的第一个实例中:

2 a
3 b
5 c

您的公式 =iserror(match(A2,A:A1,0)) 无效,因为您试图模仿公式的行为:

  • 向下拖动时,范围会向下滑动:A:A1 → A:A2 → A:A3...
  • 当公式应用于过滤器时,范围将保持不变:A:A1 → A:A1 → A:A1...