1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| Sub Bouton1_Clic()
Dim SequenceMax(12) As Double
Dim j As Integer
Dim i As Integer
Randomize
For j = 0 To 11
SequenceMax(j) = Int((100 - (-100) + 1) * Rnd + -100)
For i = 0 To 11
With Sheets("Sequence")
.Cells(1, i + 1) = SequenceMax(i)
End With
Next i
Next j
k = b To l
l = c To l
m = d To l
n = e To l
o = f To l
p = g To l
q = h To l
r = i To l
s = j To l
t = k To l
Range("A2")= worksheetFunction.Max(
(Application.WorksheetFunction.Sum(Range("$A$1:k$1"))),
(Application.WorksheetFunction.Sum(Range("$B$1:l$1"))),
(Application.WorksheetFunction.Sum(Range("$C$1:m$1"))),
(Application.WorksheetFunction.Sum(Range("$D$1:n$1"))),
(Application.WorksheetFunction.Sum(Range("$E$1:o$1"))),
(Application.WorksheetFunction.Sum(Range("$F$1:p$1"))),
(Application.WorksheetFunction.Sum(Range("$G$1:q$1"))),
(Application.WorksheetFunction.Sum(Range("$H$1:r$1"))),
(Application.WorksheetFunction.Sum(Range("$I$1:s$1"))),
(Application.WorksheetFunction.Sum(Range("$J$1:t$1"))),
(Application.WorksheetFunction.Sum(Range("$K$1:l$1"))),
)
End Sub |
Partager