Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Color duplicates
Hello,
I want Excel to color duplicates in different color and each set of duplicates have same color. I found this macro, but it does not highlight the set of duplicates in same color. Private Sub Worksheet_Change(ByVal Target As Range) Dim cell As Range Dim rng As Range Set rng = Range("A1:A100") Application.EnableEvents = False On Error GoTo sub_exit If Not Intersect(Target, rng) Is Nothing Then With Target For Each cell In rng If WorksheetFunction.CountIf(rng, cell) 1 Then cell.Interior.ColorIndex = Int(Rnd(1) * 56) + 1 End If Next cell End With End If sub_exit: Application.EnableEvents = True End Sub Any Help? Thx. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200710/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't format cell color/text color in Office Excel 2003 in fil | Excel Discussion (Misc queries) | |||
Need to Color Record in Duplicates | Excel Worksheet Functions | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
My excel 2003 wont let me fill cells with color or color the tabs. | New Users to Excel |