Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I foud the following code but would like to add a msgbox that if Duplicates
found A msgbox is tiggered and shows the count of the Duplicates.. Sub HighlightDuplicates() 'Highlight duplicates in Yellow Dim Cell As Range Dim Cell_Range As Range Dim MyCollection As New Collection 'Find last cell entry in the row LastEntry = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Address 'Define the range to examine Set Cell_Range = ActiveSheet.Range("B1", LastEntry) For Each Cell In Cell_Range On Error Resume Next MyCollection.Add Item:="1", Key:=Cell.Text If Err.Number = 457 Then Cell.Interior.ColorIndex = 6 Err.Clear End If Next Cell End Sub Thanks, Aaron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
msgbox | Excel Discussion (Misc queries) | |||
MsgBox | Excel Discussion (Misc queries) | |||
How do you delete duplicate addresses, but keep duplicate names? | Excel Discussion (Misc queries) | |||
MsgBox | Excel Programming | |||
msgbox | Excel Programming |