title: Excel - Conditional Formatting: If the cell above is different, change fill color
body: <p>So the problem I have is trying to change the fill color using conditional formatting in excel. This is basically what I want to do: </p>
  
  <p>First I have a column, something like this:</p>
  
  <pre><code>1
  1
  1
  2
  2
  3
  4
  4
  4
  </code></pre>
  
  <p>Now I want to use conditional formatting to check if cell <code>A2=A1</code>, if it is to have fill color #1, and so on. Once it gets to cell A4 and it checks that <code>A4=A3</code>, if it does not match I want it to switch the fill to fill color #2, and it continues to check. Basically every time the cell does not match the value of the cell above, to switch to a different fill color.</p>
  
  <p>I tried using the OFFSET function to check if that value was the same as the cell above, that worked but once I added the function to conditional formatting it went all funky and did not change colors.</p>