可以用函数中的IF,通过公式判断两个值是不是一致,一致返回的true,不一致的返回的是false,以Excel 2016为例,有以下步骤:
1、打开要对比的Excel表格。
![](https://iknow-pic.cdn.bcebos.com/d009b3de9c82d158bfa44acb8f0a19d8bc3e42a1?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
2、可以看到表格中有两列数据。
![](https://iknow-pic.cdn.bcebos.com/241f95cad1c8a7864c5759746809c93d70cf504e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
3、在空白一列第一行输入公式,=IF(A1=B1,"true","false"),后点击回车。
![](https://iknow-pic.cdn.bcebos.com/c75c10385343fbf29d97b659bf7eca8065388f14?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
4、得到一个结果。
![](https://iknow-pic.cdn.bcebos.com/dbb44aed2e738bd46e96a24bae8b87d6277ff911?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
5、拖拽之后得到一列的对比结果。
![](https://iknow-pic.cdn.bcebos.com/8d5494eef01f3a294ceec6b49625bc315c607ca1?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
注意事项:
当然除了这种方法,也可以用=IF(COUNTIF(B:B,A1)>0,"B列有","B列没有"),如果两列不一致,后面得到的是“B列没有”,这样也可以对比数据,根据需要可以选择。