TE = Feuil3.ListObjects(1).Range.Value
ReDim TR(1 To 50, 1 To 26)
LE = 1
Do:
TR(1, 1) = UCase("Liste des outils")
LR = 5: For C = 1 To 4
TR(LR, Choose(C, 1, 24, 25, 26)) = Choose(C, "Outil", "position", "taille", "couleur")
Next C
Do: LR = LR + 1
For C = 1 To 4
TR(LR, Choose(C, 1, 24, 25, 26)) = TE(LE, C)
Next C
LE = LE + 1: Loop Until LE > UBound(TE, 1)
Set Rng = PlageSuivante(TR, LR)
LTot = Rng.Rows.Count + 1
With Rng(4, 1).Resize(2, 23)
.MergeCells = True
End With
With Rng(4, 24).Resize(2)
.MergeCells = True
.HorizontalAlignment = xlCenter
End With
With Rng(4, 25).Resize(2)
.MergeCells = True
.HorizontalAlignment = xlCenter
End With
With Rng(4, 26).Resize(2)
.MergeCells = True
.HorizontalAlignment = xlCenter
End With
With Rng.Rows(4).Resize(2)
.Interior.Color = RGB(186, 265, 186)
.BorderAround ColorIndex:=16
End With
With Rng.Rows(4).Resize(LTot - 4)
.VerticalAlignment = xlCenter
End With
With Rng(6, 24).Resize(LTot - 5, 3)
.NumberFormat = "0.00"
.HorizontalAlignment = xlCenter
End With
Rng.Rows(4).Resize(LTot - 4).BorderAround ColorIndex:=16
Rng(6, 25).Resize(LTot - 6, 2).Borders(xlInsideVertical).ColorIndex = 16
Rng(6, 24).Resize(LTot - 6).BorderAround ColorIndex:=16
With Rng(1, 1)
.Font.Bold = True
.Font.Color = RGB(20, 127, 127)
End With
Rng(LTot + 1, 1).Value = "• Position : droit ou plat"
Rng(LTot + 2, 1).Value = "• Taille : en cm"
Rng(LTot + 3, 1).Value = "• couleur: couleur de l'objet"
Loop Until UBound(TE, 1)