Sub Test()
'partie du code juste pour le test
Cells.Clear
[A1:C1] = Array(4, 5, 6): [A8:C8] = Array(48, 32, 7)
'fin partie code test
RedHouse Feuil1.Range("A1:C10"), 4, 5, 6, 7, 32, 48
'partie du code juste pour le test
MsgBox "Suite du test?"
Cells.Clear
[A1:C1] = Array(9, 1, 5): [A8:C8] = Array(16, 32, 27)
'fin partie code test
RedHouse Feuil1.Range("A1:C10"), 32, 27, 16, 9, 1, 5
End Sub
Private Sub RedHouse(plage As Range, ParamArray tirage() As Variant)
'The Jimi Hendrix Experience Red House
'https://youtu.be/5sbS2u9GXIA
Dim Jim_i, X, nombre(), c As Range
Jim_i = 0
ReDim Preserve nombre(UBound(tirage))
For X = LBound(tirage) To UBound(tirage)
nombre(Jim_i) = tirage(X)
Jim_i = Jim_i + 1
Next
For Each c In plage
c.Interior.Color = -255 * (nombre(1) = c Or nombre(2) = c Or nombre(3) = c Or nombre(4) = c Or nombre(5) = c Or nombre(0) = c)
Next
End Sub