打开一个excel文件,按ALT+F11打开VBE,双击sheet1后在右边窗口贴入以下代码
Sub aaa()
Dim i, j, l, m, n, k
k = 1
For i = 1 To 35
For j = i + 1 To 35
For l = j + 1 To 35
For m = l + 1 To 35
For n = m + 1 To 35
Range("A" & k) = i
Range("B" & k) = j
Range("C" & k) = l
Range("D" & k) = m
Range("E" & k) = n
k = k + 1
Next n
Next m
Next l
Next j
Next i
End Sub
按上面的运行箭头,等待片刻