Hi ,
In case you find Peter's solution somewhat overwhelming , see if this is OK.
1. In any unused column , say column D , enter the number 1 in the first row of data ; I have entered 1 in cell D3.
2. In cell D4 enter the following formula , and copy down.
=IF(C4=C3, D3, -D3)
3. For the formatting , select the data range $C$3:$C$17 , enter the following rules and select two different colours.
=$D3 = 1 for one colour
=$D3 = -1 for the second colour
Narayan