Identify names with same ID and same age

China☆狼群 提交于 2019-12-12 02:39:52

问题


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:


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".



来源:https://stackoverflow.com/questions/40039282/identify-names-with-same-id-and-same-age

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!