如何比较两个地图

我在工作簿中有几张地图,想知道是否有办法比较两个地图中相同位置的特定字符。

例如,我在表1中有这样一张地图:

ABCDEFGHIJ 1: @ @ @ @ @ @ Z @ @ @ 2: @ @ Z @ @ @ @ @ @ @ 3: @ @ @ @ @ @ Z @ Z @ 4: @ @ @ @ Z @ @ @ @ @ 5: @ Z @ @ @ @ @ @ @ @ 6: @ @ @ @ @ @ @ ZZ @ 7: @ Z @ @ @ @ @ @ @ @ 8: @ @ @ @ @ @ Z @ @ @ 9: Z @ @ @ Z @ @ @ @ @ 

表2中的另一张地图如下所示:

  ABCDEFGHIJ 1: @ @ @ @ @ @ Z @ @ @ 2: @ @ Z @ @ @ @ @ @ @ 3: z @ @ @ @ @ Z @ Z @ 4: @ @ @ @ @ @ @ @ @ @ 5: @ @ @ @ @ @ @ @ @ @ 6: @ @ @ @ @ @ @ ZZ @ 7: @ Z @ @ @ @ @ @ @ @ 8: @ @ @ @ @ @ @ @ @ @ 9: Z @ @ @ Z @ @ @ @ z 

字符z是我想要比较的一个,不pipe是否位于同一列的同一行。

当我比较两幅地图时,是否有可能不需要逐一检查?

如果我明白,像这样的:

 =Sheet1!A1=A1 

在Sheet2的L1中,复制到U1,然后L1:U1复制到L9应指示哪里存在差异。


目前由OPselect的解决scheme(见评论)不是上面的,虽然上面的变化:

 =IF(A1="z",Sheet1!A1=A1,"") 

这可以准确地识别Sheet2中的哪些单元格被zZ占据,因为相同的位置在Sheet1(即A3和J9)中未被zZ占据。

对于这个例子,这恰好是识别所有差异,因为Sheet2实际上是Sheet1的一个副本,只是Sheet2中的两个zreplace了Sheet1中的两个@s。

这可能是所有OP的要求,但不包括识别,例如,E4细胞是不同的。 如果“存在于Sheet1中并且不存在于Sheet2中”是令人感兴趣的,则可以通过在Sheet1中重复以上公式(将Sheet1更改为Sheet2)来解决该问题:

 =IF(A1="z",Sheet2!A1=A1,"") 

以检测E4,B5和G8的差异,或者如果只是在一张纸上(比如Sheet2)显示一个稍微精细的公式,比如:

 =IF(AND(A1="z",Sheet1!A1="z"),"-",IF(AND(A1="z",Sheet1!A1<>"z"),2,IF(AND(A1<>"z",Sheet1!A1="z"),1,""))) 

对于这种结果:

SO23945826的例子

哪里:

空白=没有zZ在任何一个表上的位置
连字符= zZ在这两个表上的位置
1 = Sheet1上的zZ而不是Sheet2上
2 = Sheet2上的zZ而不是Sheet1上