简体   繁体   English

根据另一列值删除excel中的重复项

[英]Remove duplicates in excel based on another column value

My excel values are like (Column A and B):我的 excel 值类似于(A 列和 B 列):

在此处输入图片说明

Now, I want to remove duplicates in column A if any duplicates has value of zero (in column B).现在,如果任何重复项的值为零(在 B 列中),我想删除 A 列中的重复项。 So for the above example, I should keep a and b only.所以对于上面的例子,我应该只保留 a 和 b。

I tried:我试过:

IF((COUNTIF(A:A,A2)>1)*(B2=0),"REMOVE","KEEP")

and I get:我得到:

在此处输入图片说明

But for all c's, it should be remove.但是对于所有的 c,它应该被删除。

What's wrong in my if condition?我的 if 条件有什么问题? Thanks.谢谢。

Check if any row with the same value in column A contains a zero:检查 A 列中具有相同值的任何行是否包含零:

=IF(COUNTIFS(A:A,A1,B:B,0),"Remove","Keep")

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何根据另一列中的重复项修改列并在 Excel 中保留唯一值 - How to amend a column based on duplicates in another and leave a unique value in Excel 在Excel中,通过VBA或公式/函数的组合,根据另一列中的值从一列中删除重复项 - In Excel, remove duplicates from one column based on the values in another column, either through VBA or a combination of formulas/functions Excel 2007:按列值中的重复项删除行 - Excel 2007: Remove rows by duplicates in column value 根据Microsoft Excel中A列中的值从B列中删除重复项 - Remove duplicates from column B based on values in column A in Microsoft Excel 删除重复项并根据另一列中的值指望一列 - Remove duplicates and count on one column based on values from another column 根据另一列中的日期删除一列中的重复项 - Remove duplicates in one column based on a date in another column 删除重复项并根据另一列中的值指望一列 - Remove duplicates and count on one column based on values from another column 如果在 MS EXCEL 中匹配,则将具有重复项的列值替换为另一列 - replace a column value having duplicates with another column if matched in MS EXCEL 根据列中的最大值有条件地删除Excel中的重复项 - Conditionally removing duplicates in Excel based on largest value in a Column 根据条件删除列中的重复项 - Remove Duplicates in column based on Condition
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM