[英]Find same value in column 1, if all values are X in column 2, give Y in column 3
My goal is to get 1 single formula in Column 3 which does the following:我的目标是在第 3 列中获得 1 个单一公式,该公式执行以下操作:
Search for all exact same values as themself in Column 1. If all the values are YES in Column 2, give YES in Column 3. If not all values are YES in Column 2, give NO in Column 3.在第 1 列中搜索与他们自己完全相同的所有值。如果第 2 列中的所有值都是“是”,则在第 3 列中给出“是”。如果在第 2 列中并非所有值都是“是”,则在第 3 列中给出“否”。
My actual dataset is 10k rows, with "id's" in Column 1, so this is a simplified example.我的实际数据集是 10k 行,第 1 列中有“id”,所以这是一个简化的示例。
I know it is not the prettiest question, but thanks in advance for all the help :).我知道这不是最漂亮的问题,但提前感谢所有帮助:)。
Kind regards, Jurgen亲切的问候,尤尔根
Assumptions:假设:
Use this formula in cell C2 (or row 2 of whatever Column 3 actually is) and copy down:在单元格 C2(或任何第 3 列的第 2 行)中使用此公式并向下复制:
=IF(COUNTIFS(A:A,A2,B:B,"NO"),"NO","YES")
Adjust formula column references as necessary to suit your data.根据需要调整公式列引用以适合您的数据。 If it runs too slowly, limit the column references to your actual dataset instead of using full column.
如果它运行得太慢,请将列引用限制为您的实际数据集,而不是使用完整列。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.