Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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:


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .