Hi
Still only 4 columns used, but see if this brings back the expected result from the example file in post #3. If not, then can you put up what the result SHOULD be.
Sub aaa()
For i = Cells(Rows.Count, 2).End(xlUp).Row To 1 Step -1
If Evaluate("=MAX(COUNTIF(B" & i & ":E" & i & ",B" & i & ":E" & i & "))") > 1 Then
Cells(i, 1).EntireRow.Delete shift:=xlUp
End If
Next i
For i = 2 To 4
For j = i + 1 To 5
For k = Cells(Rows.Count, 2).End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Columns(i), Cells(k, i)) > 1 And _
WorksheetFunction.CountIf(Columns(j), Cells(k, j)) > 1 Then
Cells(k, 1).EntireRow.Delete
End If
Next k
Next j
Next i
End Sub
rylo
Bookmarks