Find Duplicate Entries
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. |
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. . |
All times are GMT +1. The time now is 11:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com