Sub MAJ(F As Worksheet, ncol%, A As Worksheet, B As Worksheet)
Dim d As Object, tablo, i&, x$, j%, n&, dk, s
Set d = CreateObject("Scripting.Dictionary")
tablo = A.[A1].CurrentRegion.Resize(, ncol) 'matrice plus rapide
For i = 2 To UBound(tablo)
x = ""
For j = 1 To ncol
x = x & Chr(1) & tablo(i, j)
Next j
d(x) = ""
Next i
tablo = B.[A1].CurrentRegion.Resize(, ncol) 'matrice plus rapide
For i = 2 To UBound(tablo)
x = ""
For j = 1 To ncol
x = x & Chr(1) & tablo(i, j)
Next j
If d.exists(x) Then d.Remove x
Next i
n = d.Count
If n = 0 Then GoTo 1
'---déconcaténation---
dk = d.keys 'tableau base 0
ReDim tablo(1 To n, 1 To ncol) 'tableau base 1
For i = 1 To n
s = Split(dk(i - 1), Chr(1))
For j = 1 To ncol
tablo(i, j) = s(j)
Next j, i
'---restitution--
1 If F.FilterMode Then F.ShowAllData 'si la feuille est filtrée
With F.[A2] '1ère cellule de destination, à adapter
If n Then .Resize(n, ncol) = tablo
.Offset(n).Resize(F.Rows.Count - n - .Row + 1, ncol).ClearContents 'RAZ en dessous
End With
With F.UsedRange: End With 'actualise la barre de défilement verticale
End Sub