For i = 1 To nbColonnes
If Cells(1, i) = "Learner Area" Or Cells(1, i) = "Learner Sub-Area" Or Cells(1, i) = "Learner Country" Or Cells(1, i) = "Learner Country" Or Cells(1, i) = "Learner Company" Or Cells(1, i) = "Type" Or Cells(1, i) = "Job" Or Cells(1, i) = "Certification Level" Or Cells(1, i) = "Release" Or Cells(1, i) = "Reference" Or Cells(1, i) = "Title" Or Cells(1, i) = "Start Date" Or Cells(1, i) = "Classroom Duration (Trainee Days)" Or Cells(1, i) = "E-learning Duration (Hours)" Or Cells(1, i) = "Internal/External" Then
nbColonnesAfter = nbColonnesAfter + 1
If Cells(1, i) = "Classroom Duration (Trainee Days)" Then
SaveColonnes(1, nbColonnesAfter) = "Classroom_Duration_Days"
changement = True
End If
If Cells(1, i) = "E-learning Duration (Hours)" Then
SaveColonnes(1, nbColonnesAfter) = "Elearning_Duration_Hours"
changement = True
End If
If Cells(1, i) = "Internal/External" Then
SaveColonnes(1, nbColonnesAfter) = "Int_Ext"
changement = True
End If
If changement = False Then
Champs = Cells(1, i).Text
Champs = Replace(Champs, " ", "_")
Champs = Replace(Champs, ":", "")
Champs = Replace(Champs, "/", "_")
SaveColonnes(1, nbColonnesAfter) = Champs
End If
changement = False
For j = 2 To nbLignes
SaveColonnes(j, nbColonnesAfter) = Cells(j, i)
Next j
End If
Next i
For i = 1 To nbLignes
Next i
Dim wb As Workbook
Dim ws As Worksheet
Set wb = Workbooks.Open(file)
Set ws = wb.Worksheets(1)
For i = 1 To nbColonnesAfter
For j = 1 To nbLignes
Workbooks(Parametres.FileName.Text & extension).Sheets(Parametres.FileName.Text).Range(AlphabetColonne(i) & j).Value = SaveColonnes(j, i)
Next j
Next i