#### serge

##### Well-known Member
Hi,
I'm looking for a CF formula that will highlight duplicate per row ( Not per column ) for those 5 numbers each time, if possible different color for different numbers which are 13 of them ? Maybe that not an option ? Thank you.
Serge.

### Excel Facts

If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

#### Fluff

##### MrExcel MVP, Moderator
=COUNTIF(\$B4:\$F4,B4)>1

To have different colour, you would need to setup a rule for each number.

#### serge

##### Well-known Member
Thank you Fluff, I appreciate your help.
Serge.

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

#### Eric W

##### MrExcel MVP

If you only have 5 columns, you would have a maximum of 2 colors per row. If you want to highlight matching colors on each row, not necessarily a given color for a given value, you can try this:

Book1
ABCDEF
41/1/202031111212221111311212
51/2/202021211311211221212112
61/3/202021121221212111311112
71/4/202011212211121222111122
Sheet29
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B4:F7Expression=(COUNTIF(\$B4:\$F4,B4)>1)*(MATCH(B4,\$B4:\$F4,0)=AGGREGATE(15,6,MATCH(\$B4:\$F4,\$B4:\$F4,0),4))textNO
B4:F7Expression=COUNTIF(\$B4:\$F4,B4)>1textNO

Note that the order of the rules is important. Make sure you enter them in this order, or adjust the order with the "Manage Rules" box.

#### serge

##### Well-known Member
Thank you Eric, The formula dont work, I'm sure it's right but it's because maybe because Excel 7 dont have " AGGREGATE " in the system ?
But Thank you for the help.
Serge.

#### Eric W

##### MrExcel MVP

=(COUNTIF(\$B4:\$F4,B4)>1)*(MATCH(B4,\$B4:\$F4,0)=LARGE(MATCH(\$B4:\$F4,\$B4:\$F4,0),4))

#### serge

##### Well-known Member
Very Nice, it works fine, Thank you very much for the help.
Serge.

Replies
2
Views
34
Replies
6
Views
51
Replies
2
Views
148
Replies
5
Views
71
Replies
1
Views
45

1,127,534
Messages
5,625,384
Members
416,099
Latest member
sudarsan23

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back