Sub RemplitListe3()
Application.ScreenUpdating = False
Dim Liste1, Liste2, Liste3, Indice%, i%, j%
[C2:C1000].ClearContents
Liste1 = Range("A2:A" & Range("A65500").End(xlUp).Row)
Liste2 = Range("B2:B" & Range("B65500").End(xlUp).Row)
ReDim Liste3(UBound(Liste1))
Indice = 0
For i = LBound(Liste1) To UBound(Liste1)
Nom = Liste1(i, 1): Existe = 0 ' Existe=0 si n'existe pas, 1 si présent
For j = LBound(Liste2) To UBound(Liste2)
If Liste2(j, 1) = Nom Then Existe = 1
Next j
If Existe = 0 Then
Liste3(Indice) = Liste1(i, 1)
Indice = Indice + 1
End If
Next i
[C2].Resize(UBound(Liste3)...
Sub RemplitListe3()
Application.ScreenUpdating = False
Dim Liste1, Liste2, Liste3, Indice%, i%, j%
[C2:C1000].ClearContents
Liste1 = Range("A2:A" & Range("A65500").End(xlUp).Row)
Liste2 = Range("B2:B" & Range("B65500").End(xlUp).Row)
ReDim Liste3(UBound(Liste1))
Indice = 0
For i = LBound(Liste1) To UBound(Liste1)
Nom = Liste1(i, 1): Existe = 0 ' Existe=0 si n'existe pas, 1 si présent
For j = LBound(Liste2) To UBound(Liste2)
If Liste2(j, 1) = Nom Then Existe = 1
Next j
If Existe = 0 Then
Liste3(Indice) = Liste1(i, 1)
Indice = Indice + 1
End If
Next i
[C2].Resize(UBound(Liste3), 1).Value = Application.Transpose(Liste3)
End Sub
Merci beaucoupBonjour Seddiki_adz,
Un essai en PJ avec :
VB:Sub RemplitListe3() Application.ScreenUpdating = False Dim Liste1, Liste2, Liste3, Indice%, i%, j% [C2:C1000].ClearContents Liste1 = Range("A2:A" & Range("A65500").End(xlUp).Row) Liste2 = Range("B2:B" & Range("B65500").End(xlUp).Row) ReDim Liste3(UBound(Liste1)) Indice = 0 For i = LBound(Liste1) To UBound(Liste1) Nom = Liste1(i, 1): Existe = 0 ' Existe=0 si n'existe pas, 1 si présent For j = LBound(Liste2) To UBound(Liste2) If Liste2(j, 1) = Nom Then Existe = 1 Next j If Existe = 0 Then Liste3(Indice) = Liste1(i, 1) Indice = Indice + 1 End If Next i [C2].Resize(UBound(Liste3), 1).Value = Application.Transpose(Liste3) End Sub
=SIERREUR(INDEX($A$2:$A$13;PETITE.VALEUR(SI(NB.SI($B$2:$B$6;$A$2:$A$13)=0;LIGNE($A$2:$A$13)-1);LIGNES($1:1)));"")
MerciBonjour,
Une autre solution (par formule) :Enrichi (BBcode):=SIERREUR(INDEX($A$2:$A$13;PETITE.VALEUR(SI(NB.SI($B$2:$B$6;$A$2:$A$13)=0;LIGNE($A$2:$A$13)-1);LIGNES($1:1)));"")
bonjour ModesteMerci