J'ai essayer de joindre le fichier mais trop lourd, j'ai essayer se changement mais cela ne fonctionne pas, quelle est le problème svp ?
Sub RechercheConsignes()
Dim X As Long
Dim Y As Long
Dim DerLigBase As Long
Dim DerLigCode As Long
Dim DerligPasTrouve As Long
Dim Trouve As Boolean
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
debut = Now
Trouve = False
DerligPasTrouve = 2
DerLigBase = Feuil1.Cells(Rows.Count, 1).End(xlUp).Row
DerLigCode = Feuil1.Cells(Rows.Count, 1).End(xlUp).Row
With Feuil1
For X = 2 To DerLigBase
For Y = 2 To DerLigCode
If .Cells(X, 8).Value = .Cells(Y, 16).Value Then
' trouvé
Trouve = True
Y = DerLigBase
End If
Next Y
If Trouve = False Then
For Y = 18 To 22
Feuil1.Cells(DerligPasTrouve, Y).Value = .Cells(X, Y).Value
Next Y
DerligPasTrouve = DerligPasTrouve + 1
End If
Trouve = False
Next X
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
fin = Now
delai = fin - debut
MsgBox "Fin de traitement." & vbNewLine & vbNewLine & "Début:" & vbTab & debut & vbNewLine & "Fin:" & vbTab & fin & vbNewLine & "Délai:" & vbTab & delai, vbInformation, "Traitement terminé"
End Sub