检查在Google表格中一组数值中是否有重复值

huangapple go评论77阅读模式
英文:

Check if a value is duplicate in a group of values in Google Sheets

问题

ID Flag_value
A X
A
B X
B
C
C X
D X
D X

我想要做的是检查是否存在某些情况,其中 "X" 值与相同的 ID 关联两次。在这种情况下,这仅发生在 D 上(两个 ID 都有 "X"),但不会发生在 A、B 或 C 上。由于有许多行,是否有一种使用公式来执行此操作的方法?非常感谢!

英文:

I have a table where I have many rows with their ids in groups of 2, and another column with one value associated that can be there ("X" value) or not:

ID Flag_value
A X
A
B X
B
C
C X
D X
D X

What I want to do is to check if there are any cases where the X value is associated to the same ID twice. In this case, this only happens for D (both of the ids have an "X"), but not for A,B or C. Having a lot of rows, is there a way of doing this with a formula? Many thanks in advance!

答案1

得分: 1

=独特筛选(A2:A;映射(A2:A;lambda(z;计数如果(B2:B;"X";A2:A;z)))>1)
英文:

You may try:

=unique(filter(A2:A;map(A2:A;lambda(z;countifs(B2:B;"X";A2:A;z)))>1))

检查在Google表格中一组数值中是否有重复值

huangapple
  • 本文由 发表于 2023年2月13日 23:26:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/75437913.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定