简体   繁体   English

需要谷歌表格数组公式只返回单元格> 1

[英]Need Google Sheets Array Formula To Return Just The Cell(s) > 1

I'm looking to list duplicate values from another tab on my sheet.我希望从我的工作表上的另一个选项卡中列出重复的值。 I have the formula below and it's almost complete.我有下面的公式,它几乎完整。 I need help with the formula only returning duplicate cells and how many occurrences.我需要帮助公式只返回重复的单元格和出现次数。

Right now it will list out every cell in the column followed the number of occurrences in the next column to the right.现在它会列出列中的每个单元格,然后是右侧下一列中出现的次数。 I want it to show me just the cells where the number is greater than 1.我希望它只显示数字大于 1 的单元格。

Any help would be appreciated!任何帮助,将不胜感激!

=IFNA(ArrayFormula(
 {
    unique(filter(Completed!E2:E,Completed!E2:E<>"")),
    COUNTIF(filter(Completed!E2:E,Completed!E2:E<>""),unique(filter(Completed!E2:E,Completed!E2:E<>"")))
 }),"")

Here's an example of what it shows currently:这是它当前显示的示例:

| | 12345 | 12345 | 1 | 1 |

| | 01234 | 01234 | 1 | 1 |

| | 56789 | 56789 | 2 | 2 |

Here's what I'd like it to return instead:这是我希望它返回的内容:

| | 56789 | 56789 | 2 | 2 |

try:尝试:

=IFNA(QUERY(INDEX(
 {UNIQUE(FILTER(Completed!E2:E, Completed!E2:E<>"")),
 COUNTIF(FILTER(Completed!E2:E, Completed!E2:E<>""),
  UNIQUE(FILTER(Completed!E2:E, Completed!E2:E<>"")))}),
 "where Col2>1"))

or just:要不就:

=QUERY(QUERY(Completed!E2:E, 
 "select E,count(E) group by E"), "where Col2 > 1", 0)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM