Function VCH(rng)
'-- Valeur Couleur Hour
'x = cref.Interior.Color
ta = rng.Value
On Error Resume Next
i = Application.Caller.Row
j = Application.Caller.Column
If Cells(i, j).Interior.Color = RGB(255, 255, 255) Then VCH = "": GoTo fin
If Cells(i, j).Interior.Color = RGB(216, 216, 216) Then VCH = "": GoTo fin
If Cells(i, j).Interior.Color <> Cells(i - 1, j).Interior.Color Then
VCH = ta(i - 1, 1)
ElseIf Cells(i, j).Interior.Color <> Cells(i + 1, j).Interior.Color Then VCH = ta(i, 1)
Else: VCH = ""
End If
fin:
End Function