Function Fonct(Row, Col)
Randomize
Application.Volatile
Dim REP()
ReDim REP(1 To 5)
For i = 1 To 5
Random = Int(Rnd * 2)
If (Random = 1) Then
'REP(i) = Cells(7, 1 + i) Cette ligne marche mais les deux suivantes non
REP(i) = ActiveSheet.Cells(Row, Col + i)
Cells(Row, Col + i).Interior.ColorIndex = 15
ElseIf (Random = 0) Then
REP(i) = "Rien"
Cells(7, 7 + i).Interior.ColorIndex = 2
End If
Next i
Fonct = REP()
End Function