Salut Joco,
Salut l'équipe,
un double-clic démarre la macro à volonté.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'
Dim tTab, iRow%, iCol%, iNb%, iMod%, iNum%
Cancel = True
'
iRow = Range("A" & Rows.Count).End(xlUp).Row
iNb = Fix((iRow - 1) / 8)
iMod = (iRow - 1) Mod 8
'
tTab = Range("A2:A" & iRow).Value
[D2:S18].ClearContents
iCol = 2
For x = 2 To iRow
iTRow = 1
iCol = iCol + 2
iNum = iNum + 1
For y = x To x + (iNb - 1) + IIf(iNum <= iMod, 1, 0)
iTRow = iTRow + 1
Do
iRnd = Int((iRow - 1) * Rnd + 1)
Loop Until CInt(tTab(iRnd, 1)) > 0
Cells(iTRow, iCol) = tTab(iRnd, 1)
tTab(iRnd, 1) = 0
Next
x = y - 1
Next
'
End Sub
A+