Salut Bernard,
Je ne comprend pas qu'elle partie du code va chercher les infos des temps test et des références produits de la feuille programme MCU pour les transposer dans la feuille test ?
End With
' Remplir le tableau tbloTEST
ReDim tbloTEST(xnblgntbloMCU, 5)
xlgn = 1
For i = LBound(tbloMCU, 1) To UBound(tbloMCU, 1)
If tbloMCU(i, 1) <> "" Then
tbloTEST(xlgn, 1) = tbloMCU(i, 1)
tbloTEST(xlgn, 2) = " "
tbloTEST(xlgn, 3) = " "
tbloTEST(xlgn, 4) = tbloMCU(i, 11)
tbloTEST(xlgn, 5) = " "
xlgn = xlgn + 1
End If
Next i
' recopie de tableau tbloTEST dans la feuille TEST
With Sheets("Test")
.Activate
.Range("A4").Resize(UBound(tbloTEST, 1), UBound(tbloTEST, 2)) = tbloTEST
' Trie les données de la feuille Test
xdlgn = .Range("A" & Rows.Count).End(xlUp).Row
Set plage = .Range("A3:E" & xdlgn)
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=Range("A4"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.Sort.SetRange Range("A3:E" & xdlgn)
.Sort.Header = xlYes
.Sort.MatchCase = False
.Sort.Orientation = xlTopToBottom
.Sort.SortMethod = xlPinYin
.Sort.Apply
Set plage = Nothing
.Range("A2").Select
End With
End Sub