Excel公式可匹配2列中的多个日期,返回是或否 [英] Excel formula to match multiple dates across 2 columns, returning Yes or No

查看:251
本文介绍了Excel公式可匹配2列中的多个日期,返回是或否的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个公式,该公式将匹配下表中A列和B列的日期.我的每个表中都有超过100000个要匹配的结果.

I need a formula that will match dates across column A and B in the below table. There are over 100000 results to match in each of my tables.

如果两列中都显示了特定日期,则返回是"语句.如果仅显示在一栏中,则为否".

If specific date appears in both columns, then it returns with 'Yes' statement. If it only appears in one column, than 'No'.

我尝试使用以下公式,但未返回正确的输出:

I tried to use the below formula but it doesn't return the correct output:

=IF(COUNTIF($B:$B, $A:$A)=0, "Yes", "No")

正确的结果应与C列相同.

The correct results should be as in column C.

谢谢.

推荐答案

这可以解决问题,命名您要显示的内容.

This will do the trick, name what you want to display.

逻辑是这样的:它计算标准是否存在于A列中.当未找到匹配项(= 0)时,给出在A列中不存在".

The logic is this: It counts if the criteria exist in Column A. When no matches is found (=0) it give "Don't exist in Column A".

=IF(COUNTIF($A:$A,B2)=0, "Don't exist in Column A","Yes")

因此,在您的情况下,当我们应用公式时,它将看起来像这样:

So in your case when we apply the formula it will look like this:

=IF(COUNTIF($A:$A;B3)=0, "No", "Yes")

图片中的注意事项由于我具有Nordic Excel版本,因此我将";"用作分隔符.美国可能会使用",".

Notice in the picture I use ";" as delimiter since I have a Nordic Excel version. US will probably use ",".

这篇关于Excel公式可匹配2列中的多个日期,返回是或否的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆