Compare 2 Ranges, Copy/Paste Row on Match
I'm trying to compare the values in 2 ranges and if found, copy the
entire row to a new worksheet.
This is what I've come up with but it's not working:
'----
Set ws = Worksheets.Add
count = 1
For Each i In rng1
For Each x In rng2
If i.Value = x.Value Then
i.EntireRow.Copy ws.Rows(count)
count = count + 1
End If
Next x
Next i
'---
Thanks,
-- Dan
|