Change the color of cells in one column when they don't match cells in another column

user3381987 picture user3381987 · Mar 5, 2014 · Viewed 244.9k times · Source

I want to check if the values in one column are the same as values in another column. Whenever the values are not the same, I would like to change the color of these cells.

For example:

http://i60.tinypic.com/2ai203l.png

Column I, Column AA both have the value of a the first month in years from 1318 till 1500 "Arabic Calender" but I want to check which of these values doesn't match and color them with yellow for example.

In this case, both cells in row 3 should have a different color after the checking operation.

Is there a way to do this?

Answer

Jerry picture Jerry · Mar 5, 2014
  1. Select your range from cell A (or the whole columns by first selecting column A). Make sure that the 'lighter coloured' cell is A1 then go to conditional formatting, new rule:

    enter image description here

  2. Put the following formula and the choice of your formatting (notice that the 'lighter coloured' cell comes into play here, because it is being used in the formula):

    =$A1<>$B1
    

    enter image description here

  3. Then press OK and that should do it.

    enter image description here