【发布时间】:2015-04-02 13:40:56
【问题描述】:
我有这样的 Excel 数据:
我想在 ColumnA 中查找 ColumnB 中不存在的记录。
【问题讨论】:
-
@pnuts 你是对的; stackoverflow.com/questions/12393524/… 可能更接近。
标签: excel if-statement excel-formula worksheet-function countif
我有这样的 Excel 数据:
我想在 ColumnA 中查找 ColumnB 中不存在的记录。
【问题讨论】:
标签: excel if-statement excel-formula worksheet-function countif
我假设值从第二行(A2 和 B2)开始
将下面的代码放在要显示结果的列中
=IF(COUNTIF(B:B,A2),A2,"") //"" or 0 - whatever you want to put if B is not in A
【讨论】:
; 标记。
, 而不是 ; 编写公式,它将无效。那是因为 excel 将 , 视为 . 分隔符。但你当然是对COUNTIF
假设您的数据从第 1 行开始,请尝试:
=IFERROR(MATCH(A1,B:B,0),"#")
在第 1 行并复制到适合。 # 表示在ColumnB 中没有找到对应行的ColumnA 值。一个数字表示 ColumnB 中与该值所在行的 ColumnA 值匹配的行。
【讨论】: