Identify names with same ID and same age

2019-09-07 14:20发布

Hi this is my first post here, sorry for my bad english.

I'd like to see if all the age of one value are the same. If they is no duplicate or if the values are the same, then it's ok to me. In the example below, when it's "NOT OK", i'd like to copy my row, then paste it in another sheet (I can deal with this part ^^)

ID   Age   My Value
-------------------
1    15    NOT OK    
2    50    OK
2    50    OK
3    35    OK
1    16    NOT OK
1    15    NOT OK

Thanks in advance

1条回答
成全新的幸福
2楼-- · 2019-09-07 14:55

You can compare a COUNTIF that simply counts based on the ID to a COUNTIFS which counts based on ID and Age:

=IF(COUNTIF($A:$A,$A2)=COUNTIFS($A:$A,$A2,$B:$B,$B2),"OK","NOT OK")

So that if the total number of entries for each ID matches the number of entries with the same age, it will show "OK".

查看更多
登录 后发表回答