Hey guys,
I am absolutely new to excel programming, so I would appreciate a little help with my program. I have two lists with datas, both has a column with emails (simply text). I need need to compare those two columns, and if there is a duplicate email in the second list (List2), delete the whole row with the email. To sum it up, each time I need to compare one email from the List1 to plenty of emails from the List2 (that is why I chose 2 for cycles).
Here is my work, but it does not work at all (there is probably a syntax error in the IF statement).
Sub nahrada()
For I = 0 To Rows.Count
For J = 1 To Worksheets("List2").Rows.Count
IF (Range(Cells(I,6)).Text = Worksheets("List2").Range(Cells(J,3)).Text) Then
Worksheets("List2").Rows(J).Delete
End If
Next J
Next I
End Sub
Thanks a lot for your help, I really appreciate it
Bookmarks