Compare columns and create list of duplicates
Solved/Closed
Related:
- Compare columns and create list of duplicates
- Tweetdeck larger columns - Guide
- Display two columns in data validation list but return only one - Guide
- Beyond compare download - Download - File management
- Amd crossfire gpu list - Guide
- Counter strike 1.6 cheats list - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Aug 9, 2016 at 11:21 AM
Aug 9, 2016 at 11:21 AM
Hi CarlosIRL,
Let's say:
- Sheet1 has the data of "insured data" with the agency codes in column A.
- Sheet2 has the list of "agency codes in the system", also in column A.
When the agency code on Sheet1 is found on Sheet2 then the entire row from Sheet1 will be copied to Sheet3.
Here is the code:
Best regards,
Trowa
Let's say:
- Sheet1 has the data of "insured data" with the agency codes in column A.
- Sheet2 has the list of "agency codes in the system", also in column A.
When the agency code on Sheet1 is found on Sheet2 then the entire row from Sheet1 will be copied to Sheet3.
Here is the code:
Sub RunMe()
Dim qFound As Range
Sheets("Sheet1").Select
For Each cell In Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
Set qFound = Sheets("Sheet2").Columns("A:A").Find(cell.Value)
If Not qFound Is Nothing Then
Rows(cell.Row).Copy Sheets("Sheet3").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
Next cell
Sheets("Sheet3").Select
End Sub
Best regards,
Trowa
Aug 15, 2016 at 09:30 AM