Dim sp, sq, sn, y, c00
Sub M_snb()
c00 = "ABCDEFGHIJ"
sn = Array(0, 20, 12, 9, 15, 6, 20, 14, 7, 6, 2)
y = -1
ReDim sp(9, 1)
ReDim sq(2000, 1)
For j = 1 To Len(c00)
y = y + 1
sp(0, 0) = Mid(c00, j, 1)
sp(0, 1) = sn(InStr(c00, Mid(c00, j, 1)))
sq(y, 0) = sp(0, 0)
sq(y, 1) = sp(0, 1)
For jj = j + 1 To Len(c00)
M_snb_000 1, jj
For jjj = jj + 1 To Len(c00)
M_snb_000 2, jjj
For jjjj = jjj + 1 To Len(c00)
M_snb_000 3, jjjj
For jjjjj = jjjj + 1 To Len(c00)
M_snb_000 4, jjjjj
For jjjjjj = jjjjj + 1 To Len(c00)
M_snb_000 5, jjjjjj
For jjjjjjj = jjjjjj + 1 To Len(c00)
M_snb_000 6, jjjjjjj
For jjjjjjjj = jjjjjjj + 1 To Len(c00)
M_snb_000 7, jjjjjjjj
For jjjjjjjjj = jjjjjjjj + 1 To Len(c00)
M_snb_000 8, jjjjjjjj
For jjjjjjjjjj = jjjjjjjjj + 1 To Len(c00)
M_snb_000 9, jjjjjjjjjj
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Cells(2, 11).Resize(UBound(sq), 2) = sq
End Sub
Sub M_snb_000(x, z)
y = y + 1
sp(x, 0) = sp(x - 1, 0) & Mid(c00, z, 1)
sp(x, 1) = sp(x - 1, 1) + sn(InStr(c00, Mid(c00, z, 1)))
sq(y, 0) = sp(x, 0)
sq(y, 1) = sp(x, 1)
End Sub