Hello,
I want to compare two data in two column to find duplicates in excel. I found a macro that can help me to arrange some simple data sequence as pics below.
After running that macro, it will return result as below.
Matches data will shown at column B. My problem is, i want to add something that can filter my data. (I dont know how to say ). But i think those pics below can explain it for me .
My new data sequence [C] with additional characters at the end of original data.
So i want to add something that can matches 1st 10 characters and show it at column B by comparing with original data at column A.
This is the macro that i used btw.
Hope someone can help me out. Sorry for my bad english . Thanks in advance.
I want to compare two data in two column to find duplicates in excel. I found a macro that can help me to arrange some simple data sequence as pics below.
After running that macro, it will return result as below.
Matches data will shown at column B. My problem is, i want to add something that can filter my data. (I dont know how to say ). But i think those pics below can explain it for me .
My new data sequence [C] with additional characters at the end of original data.
So i want to add something that can matches 1st 10 characters and show it at column B by comparing with original data at column A.
This is the macro that i used btw.
Code:
Sub Find_Matches()
Dim CompareRange As Variant, x As Variant, y As Variant
Set CompareRange = Range("C1:C8")
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 1) = x
Next y
Next x
End Sub
Last edited: