From: swimeveryday on
I have a column of data that is almost 5000 cells deep. I want to be able to
have the groups of duplicates colored a unique color. For example, if there
are 12 cells that have a value of 9231, I want to see that those 12 and only
those 12 get colored red. Then, maybe there are 200 cells that have a value
of 74; those would all get blue. And so on, such that each group of equal
valued cells gets a unqiue color. Can this be done and if so, how? Thanks!
It would really help if you could post AND email me an answer at
swimeveryday(a)yahoo.com.
From: JB on


Sub GroupColor()
Set mondico = CreateObject("Scripting.Dictionary")
For Each c In Range("a2", [a65000].End(xlUp))
mondico.Item(c.Value) = mondico.Item(c.Value) + 1
Next c
For Each c In Range("a2", [a65000].End(xlUp))
If mondico.Item(c.Value) > 1 Then
p = Application.Match(c.Value, mondico.keys, 0)
c.Interior.ColorIndex = p + 2
End If
Next c
End Sub

http://cjoint.com/?eng7tTxg62


JB
http://boisgontierjacques.free.fr/

On 13 avr, 06:22, swimeveryday
<swimevery...(a)discussions.microsoft.com> wrote:
> I have a column of data that is almost 5000 cells deep.  I want to be able to
> have the groups of duplicates colored a unique color.  For example, if there
> are 12 cells that have a value of 9231, I want to see that those 12 and only
> those 12 get colored red.  Then, maybe there are 200 cells that have a value
> of 74; those would all get blue.  And so on, such that each group of equal
> valued cells gets a unqiue color.  Can this be done and if so, how?  Thanks!  
> It would really help if you could post AND email me an answer at
> swimevery...(a)yahoo.com.