Excel:比较和格式化单元格

Excel:比较和格式化单元格,excel,formatting,conditional-formatting,Excel,Formatting,Conditional Formatting,我有两个不同值的列。 我希望做到的是: 1. if value of any cell in A is not in any cell of B > make cell blue 2. if value of any cell in B is not in any cell of A > make cell yellow 3. if value of any cell in A is also in any cell of B > make cell green 在B2中找到

我有两个不同值的列。 我希望做到的是:

1. if value of any cell in A is not in any cell of B > make cell blue
2. if value of any cell in B is not in any cell of A > make cell yellow
3. if value of any cell in A is also in any cell of B > make cell green
在B2中找到A2,使A2和B2均为绿色

A3不在B,让A3变成蓝色

在B3中找到A4,使两者都为绿色

B8不在A中,将B8设为黄色

A8在B中的任何地方,使A8为蓝色


我希望这是有意义的,并且在条件格式中是可能的。我想不出这个公式。非常感谢您的帮助。

请选择A2:A8,主页>样式-条件格式,新规则…,使用公式确定要格式化的单元格,格式化此公式为真的值:

=MATCH($A2,$B$1:$B$10,0)  
使用绿色格式和其他规则:

=ISERROR(MATCH($A2,$B$1:$B$10,0))  
使用蓝色格式

选择B2:B8并重复上述操作:

绿色:
=MATCH($B2,$A$1:$A$10,0)
和黄色:
=ISERROR(MATCH($B2,$A$1:$A$10,0))

非常类似于:-阅读一下,看看你是否能自己解决它