- 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:
Dim qFound As Range
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)