I am trying to conditional format all rows (in range) based on the value of a cell in the row above. I have got this code which is incorrect but I don't know why. Debugging indicates that there is a problem with the line starting Range("A2:M2).Cell .......... But it seems logical to me.
If the value of A3 = value of A2 then row (or range) should be colour 1 else change colour to colour 2
If the value of A4 = value of A3 then colour 1 or change to colour 2.
Thus, rows 2, 3, 4,5 may be colour 1.
Row 6 may be colour 2 because the value in A5 is not the same as A6
Row 7 returns to colour 1 because A7 is not the same value as A6 ..... and so on.
Where is the error in my code?
Many thanks in advance.
Bookmarks