Function couleur(sel As Object) As Variant
Application.Volatile
Dim temp As Variant
Dim i As Integer, j As Integer
temp = sel.Interior.ColorIndex
If IsArray(sel) Then
For i = 1 To UBound(temp, 1)
For j = 1 To UBound(temp, 2)
If temp(i, j) > 0 Then
temp(i, j) = 1
Else
temp(i, j) = 0
End If
Next j
Next i
Else
If temp.Interior.ColorIndex > 0 Then
temp = 1
Else
temp = 0
End If
End If
couleur = temp
End Function