I\'d like to apply some conditional formatting where each cell of a row is compared to the cell in the previous row. If it differs then the row is highlighted.
Yes, it is possible. It was possible in previous versions of Excel, too.
The condition is very simple.
Select the data, starting from the second row of data (the third row counting from the header), bring up the condition formatting dialog, select "Formula" and enter , =A3<>A2
=A3<>OFFSET(A3,-1,0)
where A3
is the top-left cell of the selection.
Note the absence of dollar signs - Excel will automatically suggest them, so delete accordingly.
Because the reference is not absolute, the formatting will properly apply to the whole table.
You can make it even more versatile, like this:
=INDIRECT(ADDRESS(ROW(), COLUMN()))<>INDIRECT(ADDRESS(ROW()-1, COLUMN()))
Here's how it works:
=ADDRESS(ROW(), COLUMN())
refers to the current cell (i.e. the one to be formatted).=ADDRESS(ROW()-1, COLUMN())
refers to the cell above the current cell. Then all I do is compare the two.