View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Mansfield[_2_] John Mansfield[_2_] is offline
external usenet poster
 
Posts: 15
Default Find Duplicate Entries

Hi,

This will find the duplicate entries . . .

Sub Find_Duplicates()

Dim CompareRange As Variant
Dim Selection As Variant
Dim x As Variant
Dim y As Variant

Set Selection = Range("B2:B6")
Set CompareRange = Range("C2:C6")

For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 2) = x
Next y
Next x

End Sub

John Mansfield
pdbook.com

-----Original Message-----
I have a list in column A and a list in column B. I

would
like to have a macro that compares the two lists and then
records duplicate entries in column C and unique entries
in column D. Would anyone have a macro / macros that
would do this?

P.S. I know that this can be done with array formulas.
However, the data set is so large that the arrays did not
properly calculate. I would prefer code if possible.
.