Sub TableauSelect()
MettreEnTableau Selection, 1
End Sub
Sub MettreEnTableau(ByVal Rng As Range, ByVal NumTSP As Byte)
Dim Wbk As Workbook, TSP As TableStyle
Set Wbk = Rng.Worksheet.Parent
On Error Resume Next
Set TSP = Wbk.TableStyles("TSP" & NumTSP)
If Err Then Set TSP = Wbk.TableStyles.Add("TSP" & NumTSP)
On Error GoTo 0
TSP.TableStyleElements(xlHeaderRow).Interior.Color = Rng.Rows(1).Interior.Color
TSP.TableStyleElements(xlRowStripe1).Interior.Color = Rng.Rows(2).Interior.Color
TSP.TableStyleElements(xlRowStripe2).Interior.Color = Rng.Rows(3).Interior.Color
Rng.Worksheet.ListObjects.Add(xlSrcRange, Rng, , xlYes).TableStyle = TSP.Name
End Sub