英文:
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)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论