Home » excel » excel – Conditional formatting for cells when cell above has the same value

excel – Conditional formatting for cells when cell above has the same value

Posted by: admin May 14, 2020 Leave a comment

Questions:

Is it possible to apply conditional formatting to a whole sheet such that whenever the cell above the current cell has the same value (either text or number) as the current cell, the current cell will be formatted yellow fill/blue font?

For example, when cell:

A1 is blank
A2 AAA
A3 AAA
A4 AAA
A5 is blank
A6 AAA
A7 AAA

only cells A3, A4 and A7 will be formatted with yellow fill and font blue.

How to&Answers:

While in A2, please try a Conditional Formatting formula rule of:

=AND(A1=A2,A2<>"")  

with Applies to =$2:$20 or as far down as you wish or are able to go, with yellow fill and blue font.