1 2 3 4 5 6 7 8 9 10 11 12
| Option Explicit
Sub es()
Dim f As Range, c As Variant
Application.ScreenUpdating = False
Sheets("Feuil1").Activate
For Each c In Sheets("Feuil1").Range("p1:p" & Range("p65536").End(xlUp).Row)
Set f = Sheets("Feuil1").Range("n1:n" & Range("n65536").End(xlUp).Row).Find(c, LookIn:=xlValues, LookAt:=xlWhole)
If f Is Nothing Then
Range("p" & c.Row & ":r" & c.Row).Cut Destination:=Sheets("Feuil2").Range("p65536").End(xlUp)(2)
End If: Next
[p1:r65536].SpecialCells(xlCellTypeBlanks).Columns.Delete
End Sub |
Partager