Sub Colorer(Li, Col)
With Cells(Li, Col).Interior
.Pattern = xlPatternLinearGradient
.Gradient.Degree = 90
.Gradient.ColorStops.Clear
End With
With Cells(Li, Col).Interior.Gradient.ColorStops.Add(0)
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
With Cells(Li, Col).Interior.Gradient.ColorStops.Add(0.5)
.ThemeColor = xlThemeColorAccent1
.TintAndShade = 0
End With
With Cells(Li, Col).Interior.Gradient.ColorStops.Add(1)
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End Sub
Sub Bouton1_Cliquer()
Dim i
For i = 5 To 77
If Cells(4, i) >= [B5] And Cells(4, i - 1) < [B5] Then Cells(5, i) = [D5]
If Cells(4, i) >= [B5] And Cells(4, i) < [C5] Then Call Colorer(5, i)
If Cells(4, i) >= [B6] And Cells(4, i - 1) < [B6] Then Cells(5, i) = [D6]
If Cells(4, i) >= [B6] And Cells(4, i) < [C6] Then Call Colorer(5, i)
Next
End Sub