Highlighting duplicates but in alternating fashion

abaker77

New Member
Joined
Oct 11, 2011
Messages
18
Office Version
  1. 365
Hello,
This one has me stumped, and I'm not easily stumped.:confused:
I have a simple column of dates; some dates are duplicated, some are not.
What I want is to be able to highlight only the duplicated dates, in alternating fashion.
You might think that Conditional Formatting already provides this - just go to Highlight Duplicates.
But that will not achieve the objective since I don't want all the duplicated dates highlighted in one color.
I want one color to highlight the first group of duplicated dates, a second color to highlight the next group of duplicated dates, then back to the 1st color for the next group, etc. An easy illustration is attached.
Thank you !
 

Attachments

  • dupe dates.JPG
    dupe dates.JPG
    89.3 KB · Views: 34

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
try this
taken from another forum

needs a helper column B with the 2 formula
Book1
AB
1
24/1/201
34/1/201
44/1/201
53/1/20-1
65/1/202
75/1/202
85/1/202
95/1/202
105/1/202
116/1/20-2
126/2/20-2
136/3/20-2
146/4/20-2
156/5/20-2
166/6/20-2
176/7/20-2
186/8/20-2
196/9/20-2
206/10/20-2
218/1/201
228/1/201
238/1/201
Sheet1
Cell Formulas
RangeFormula
B2B2=IF(A2=A3, 1, -2)
B3:B23B3=IF($A2=$A3, B2, IF($A3=$A4, IF(B2>0,3-B2,B2+3), IF(B2>0,-B2,B2)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:AExpression=$B1=2textNO
A:AExpression=$B1=1textNO
 
Upvote 0
Solution
Cross posted Highlight duplicated dates - in alternating fashion
and here Conditional formatting formula to highlight alternate groupings of duplicate dates - OzGrid Free Excel/VBA Help Forum

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.

If you have posted this on any other sites, please provide the links.
Thanks
 
Upvote 0
try this
taken from another forum

needs a helper column B with the 2 formula
OMG - IT WORKS; THIS IS POSITIVELY BRILLIANT ! I amazes me how you could come up with this, seemingly so easily and quickly. I tip my hat off to you !
Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,214,615
Messages
6,120,538
Members
448,970
Latest member
kennimack

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