Sub a()
Dim a%, b%, c%, d%, e%, f%, g%, i&
i = 2
For a = 1 To 20
For b = a + 1 To 20
For c = b + 1 To 20
For d = c + 1 To 20
For e = d + 1 To 20
For f = e + 1 To 20
Cells(i, 1) = Cells(1, a)
Cells(i, 2) = Cells(1, b)
Cells(i, 3) = Cells(1, c)
Cells(i, 4) = Cells(1, d)
Cells(i, 5) = Cells(1, e)
Cells(i, 6) = Cells(1, f)
i = i + 1
Next f
Next e
Next d
Next c
Next b
Next a
End Sub
A1——T1存放你的20个数
速度有点慢。。。。。
右键SHEET1(工作表标签),查看代码。粘贴上面的代码。运行。