Sub test()
Dim a As Integer, b As Integer, c As Integer, d As Integer, e As Integer, f As Integer, g As Integer, h As Integer
Dim k As Long
Dim xxr
k = 0
For a = 0 To 4 b = a
For c = 0 To 4
d = c
For e = 0 To 4
For f = 0 To 4
If f <> e Then
For g = 0 To 4
For h = 0 To 4
If h <> g Then
xxr = Array(a, b, c, d, e, f, g, h) Range(Cells(k + 10, "A"), Cells(10 + k, "H")) = xxr
k = k + 1
End If
Next
Next
End If
Next
Next
Next
NextEnd Sub
Sub test() Dim a As Integer, b As Integer, c As Integer, d As Integer, e As Integer, f As Integer, g As Integer, h As Integer Dim k As Long Dim xxr k = 0 For a = 0 To 4 b = a For c = 0 To 4 d = c For e = 0 To 4 For f = 0 To 4 If f <> e Then For g = 0 To 4 For h = 0 To 4 If h <> g Then xxr = Array(a, b, c, d, e, f, g, h) Range(Cells(k + 10, "A"), Cells(10 + k, "H")) = xxr k = k + 1 End If Next Next End If Next Next Next NextEnd Sub