For k = 16 To 23
Onglet = Sheets(k).Name
' Début du contrôle des onglets
Workbooks(FichierRef).Activate
Workbooks(fichier_Macro).Sheets(Onglet).Select
With Workbooks(fichier_Macro).Sheets(Onglet).range("A:A")
Set c = .Find("Ranges", LookIn:=xlValues)
If Not c Is Nothing Then
Lig = c.Row
End If
End With
Der_Col = Cells(Lig + 1, 256).End(xlToLeft).Column
ligneFin = Cells(65536, 1).End(xlUp).Row
Workbooks(FichierRef).Activate
Montab3 = Workbooks(fichier_Macro).Sheets(Onglet).range(Cells(Lig, 1), Cells(ligneFin, Der_Col)).Value
Workbooks(FichierCont).Activate
Workbooks(FichierCont).Sheets(Onglet).Select
Der_Col2 = Cells(Lig2 + 1, 256).End(xlToLeft).Column
ligneFin2 = Cells(65536, 1).End(xlUp).Row
Montab4 = Workbooks(FichierCont).Sheets(Onglet).range(Cells(Lig, 1), Cells(ligneFin2, Der_Col2)).Value
ReDim CodesHisto(1 To UBound(Montab3, 1))
ReDim CodesModif(1 To UBound(Montab4, 1))
For i = Lig To UBound(Montab3, 1)
CodesHisto(i) = Montab3(i, 1).....Montab3(i,Der_Col) ' c'est ici que je voudrais stocker toutes mes colonnes concaténées
Next i
For i = Lig To UBound(Montab4, 1)
CodesModif(i) = Montab4(i, 1).....Montab4(i,Der_Col2) ' Idem que pour Montab3
Next i
For i = 1 To UBound(Montab3, 1)
If IsError(Application.Match(CodesHisto(i), CodesModif, 0)) Then
Call EcritLigne(FichierRef, Onglet, i, "Effacé")
End If
Next k