Home » excel » conditional formatting – Excel – How to highlight duplicate values in their own row when values aren't adjacent

# conditional formatting – Excel – How to highlight duplicate values in their own row when values aren't adjacent

Questions:

In my spreadsheet, I am trying to highlight duplicate values in a row.
Catch #1 is, every row is assessed differently.
Catch #2 is, the values are not adjacent in their rows.

Example:

``````    A   |   B   |   C   |   D   |   E   |   F   |   G   |   H   |   I   |
1 Bob   | 1     | Jim   | 2     | Pat   | 3     | Sam   | 4     |       |
2 Bob   | 3     | Pat   | 1     | Sam   | 1     | Jim   | 2     |       |
3 Jim   | 2     | Bob   | 2     | Pat   | 3     | Sam   | 2     |       |
4 Pat   | 3     | Pat   | 3     |       |       |       |       |       |
5       |       |       |       |       |       |       |       |       |
``````

In the example, I am checking each row for duplicates in columns B, D, F and H. Basically the number columns are being assessed against each other.

Row 1: None are highlighted.

Row 2: D2 and F2 are highlighted

Row 3: B3, D3, H3 are highlighted

Row 4: B4 and D4 are highlighted, but F4 and H4 are not because they’re empty. A4 and C4 aren’t highlighted either because columns A, C, E and G aren’t being checked.

Try this formula in conditional formatting’s formula based rule:

`=AND(ISNUMBER(A1), COUNTIF(1:1,A1)>1)`

Hope this helps!