Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to conditionally highlight cells in a row. When the items in column B are duplicates then cells in columns B and C should be highlighted.

The value 7264 in column B has duplicates so items ABC, DEF, GHI in column C would be highlighted and values 7264 in column B too. Similar way items MNOP and PWE in column C and values 8765 in column B would be highlighted.

A     B      C
---------------
1   7264    ABC
2   7264    DEF
3   7264    GHI
4   8112    JKL
5   8765    MNOP
6   8765    PWE
7   9287    UIY
share|improve this question
    
Please let us know if you are solving this problem in Microsoft Excel or a similar application. –  pabouk Oct 10 '13 at 2:44

1 Answer 1

In Excel, this can be achieved with Conditional Formatting using a formula to determine which cells to format. You can achieve the result by selecting the relevant cells in columns B and C and applying the following rule:

=COUNTIF($B:$B,$B1)>1

This counts all the cells in column B that match the current row's cell in column B, and returns TRUE if the count goes above 1 (implying duplicates). The output and menu look like this:

Conditional Formatting Setup

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.