16!12!= "13!" mas que a conta não é valida, mas manualmente sai
seria o valor 1820/13 =140
que seria o valor a baixo
1 2 3 4 5 6 7 8 9 10 11 12 <
1 2 3 4 5 6 7 8 9 10 13 14<
1 2 3 4 5 6 7 8 9 10 15 16<
1 2 3 4 5 6 7 8 9 11 13 15<
1 2 3 4 5 6 7 8 9 11 14 16<
1 2 3 4 5 6 7 8 9 12 13 16<<<<<<
e assim segue : não sei se entendeu poderia por favor me ajudar vi estou a meses apanhando rsrs
formula da A
Private Sub CommandButton1_Click()
Dim vQtd As Integer
Dim Ln As Long
Dim Col As Integer
Dim W As Worksheet
Dim A, B, C, D, E, F, G, H, I, J, K, L As Integer
Set W = Planilha1
W.Select
W.Range("A:L").ClearContents
vQtd = W.Range("p2").Value "16"
Ln = 1
Col = 1
For A = 1 To vQtd - 11
For B = A + 1 To vQtd - 10
For C = B + 1 To vQtd - 9
For D = C + 1 To vQtd - 8
For E = D + 1 To vQtd - 7
For F = E + 1 To vQtd - 6
For G = F + 1 To vQtd - 5
For H = G + 1 To vQtd - 4
For I = H + 1 To vQtd - 3
For J = I + 1 To vQtd - 2
For K = J + 1 To vQtd - 1
For L = K + 1 To vQtd
Cells(Ln, Col) = A
Cells(Ln, Col + 1) = B
Cells(Ln, Col + 2) = C
Cells(Ln, Col + 3) = D
Cells(Ln, Col + 4) = E
Cells(Ln, Col + 5) = F
Cells(Ln, Col + 6) = G
Cells(Ln, Col + 7) = H
Cells(Ln, Col + 8) = I
Cells(Ln, Col + 9) = J
Cells(Ln, Col + 10) = K
Cells(Ln, Col + 11) = L
Ln = Ln + 1
Next L
Next K
Next J
Next I
Next H
Next G
Next F
Next E
Next D
Next C
Next B
Next A