Sub distrib()
Dim TabInit() As Variant
Dim TabFinal() As Variant
With ActiveSheet
TabInit = .Range("A1").CurrentRegion.Value
temp = 0
mult = 0
'on determine le nombre de combinaisons
For j = LBound(TabInit, 2) To UBound(TabInit, 2)
temp = 0
For i = LBound(TabInit, 1) + 1 To UBound(TabInit, 1)
temp = IIf(TabInit(i, j) <> "", temp + 1, temp)
Next i
mult = IIf(mult = 0, temp, temp * mult)
Next j
'on dimensionne le tableau final
ReDim TabFinal(1 To mult, 1 To 4)
'on récupère le nombre d'itération pour chaque colonne
max1 = .Range("A" & .Rows.Count).End(xlUp).Row - 1
max2 = .Range("B" & .Rows.Count).End(xlUp).Row - 1
max3 = .Range("C" & .Rows.Count).End(xlUp).Row - 1
max4 = .Range("D" & .Rows.Count).End(xlUp).Row - 1
'on remplit le tablo final
ind = 0
For i = 1 To max1 Step 1
For j = 1 To max2 Step 1
For k = 1 To max3 Step 1
For l = 1 To max4 Step 1
ind = ind + 1
TabFinal(ind, 1) = TabInit(i + 1, 1)
TabFinal(ind, 2) = TabInit(j + 1, 2)
TabFinal(ind, 3) = TabInit(k + 1, 3)
TabFinal(ind, 4) = TabInit(l + 1, 4)
Next l
Next k
Next j
Next i
'on colle le tableau final
.Range("M2").Resize(UBound(TabFinal, 1), UBound(TabFinal, 2)) = TabFinal
End With
End Sub