Highlighting Non-Consecutive Duplicates

Innoguide

Board Regular
Joined
Sep 13, 2011
Messages
159
Does anybody have any suggestions on how to create a conditional rule that finds non-consecutive duplicates in a column of data (numbers or text)? For example, the data below have been highlighted (red text) showing the desired result. Note that all occurrences need to be formatted.

AB
AB
AB
ghy
ghy
ABCD
ABC
r
r
ghy
eee
eee

Any help would be greatly appreciated!
 
Here's another approach. Try this formula in conditional formatting

=MATCH(2,1/(A$2:A$13=A2))-MATCH(A2,A$2:A$13,0)<>COUNTIF(A$2:A$13,A2)-1

If there are any blanks in the range it won't format those

Nice addition Barry - Hadn't thought about blanks!
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top