Conditionally formatting cells if their value equals any value of another column

后端 未结 6 1566
温柔的废话
温柔的废话 2020-12-29 07:50

I have data in the A and B columns. B column\'s data is mostly duplicates of A\'s data, but not always. For example:

6条回答
  •  执念已碎
    2020-12-29 08:06

    I unable to comment on the top answer, but Excel actually lets you do this without adding the ugly conditional logic.

    Conditional formatting is automatically applied to any input that isn't an error, so you can achieve the same effect as:

    =NOT(ISERROR(MATCH(A1,$B$1:$B$1000,0)))
    

    With this:

    = MATCH(A1,$B$1:$B$1000,0)))
    

    If the above is applied to your data, A1 will be formatted if it matches any cell in $B$1:$B$1000, as any non-match will return an error.

提交回复
热议问题