Re : Comparaison de 2 tableaux
voici du code pour réaliser ton travail
Sub Comparecolonnes()
'COMPARAISON DANS UNE MEME FEUILLE DE 2 COLONNES,L UNE APRES L AUTRE
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim RngA As Range, RngB As Range, Cll As Object
Dim Cola&, Colb&, Choix&, Rw&
With ActiveSheet
Range("A2").CurrentRegion.Interior.ColorIndex = xlNone
Cola = 1: Colb = 2
Rw = 2
Set RngA = Range(Cells(Rw, Cola), Cells(Rows.Count, Cola).End(xlUp))
Set RngB = Range(Cells(Rw, Colb), Cells(Rows.Count, Colb).End(xlUp))
Choix = 1
Select Case Choix
'BALAYAGE DES 2 COLONNES
Case Is = 1
For Each Cll In RngB
If Application.CountIf(RngA, Cll) >= 1 Then
With RngB
.Find(Cll).Interior.ColorIndex = 33 'colorie l'item trouvé
End With
End If
Next
Rw = 2
'Case Is = 1, 2
For Each Cll In RngA
If Application.CountIf(RngB, Cll) >= 1 Then
With RngA
.Find(Cll).Interior.ColorIndex = 35 ' colorie l'item trouvé
End With
End If
Next
End Select
Set RngA = Nothing: Set RngB = Nothing
End With
Application.Calculation = xlCalculationAutomatic
'MsgBox "terminé"
End Sub
Cordialement
Flyonets