如何计算在 Google 表格的一列中只出现一次(和多次)的值的数量?

How to count the number of values that appear only once (and more than once) in a column in Google Sheets?

假设我有以下列 A:

X
Y
X
Z
W
Z
W

我想写 2 个公式,一个计算恰好出现一次的值的数量,一个计算出现多次的值的数量。因此,对于上一列,结果将是 1(仅 Y)和 3(W、X、Z)。

我尝试了以下公式,但出现错误:

=FILTER(A:A,COUNTIF(A:A,A:A)>1)

如何使用 Google 表格来完成此操作?请注意,某些列值可能为空,应忽略。

只有一次:

=FILTER(A:A, COUNTIF(A:A, A:A)=1)


不止一次:

=UNIQUE(FILTER(A:A, COUNTIF(A:A, A:A)>1))