简体   繁体   English

在第 1 列中找到相同的值,如果第 2 列中的所有值都是 X,则在第 3 列中给出 Y

[英]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:假设:

  • Row 1 is a header row and actual data starts in row 2第 1 行是标题行,实际数据从第 2 行开始
  • Column 1 is A第 1 列是 A
  • Column 2 is B第 2 列是 B

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.

相关问题 如果列a包含x,则在与x相同的行中找到y并显示值 - If column a contains x find y in same row as x and display value VBA在A列中找到x值,在B列中找到y值,在C列中找到和值 - VBA find value x in column A and value y in column B and sum values in column C Excel-在X列中查找最后一个相同的值,并将Y列添加到当前单元格 - Excel - Find last same value in Column X and add Column Y to current cell 是否有脚本或表格 function 可以在 x 列中查找所有特定单词出现并在 y 列中添加相应的值? - Is there a script or sheets function to find all particular word occurences in column x and add a corresponding value in column y? VBA - 在具有条件的列中查找所有相同的值 - VBA - Find all same values in a column with a condition 将所有具有相同值的值添加到相邻列中? - Adding all values with the same value in an adjacent column? 在同一列的值的6'半径内查找和提取列中的值 - Find and extract values in a column that are in a 6' radius of a value of the same column Excel:从第2列中检索具有相同第1列值的所有值 - Excel: retrieve all values from column 2 having the same column 1 value 将列A中所有具有相同值的列A中的所有值相加 - Sum all values from column A that have the same value on column B 在A列中查找值X的行,并在B列的同一行中插入值Y - Finding row of value X in column A, and inserting value Y in the same row, in column B
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM