VBA遞歸組合排列26個英文字母包括重復字母如AA?
Sub sdgs()
r = 1
For t = 65 To 90
Cells(r, 1) = Chr(t)
r = r + 1
Next
For y = 65 To 90
For e = 65 To 90
Cells(r, 1) = Chr(y) & Chr(e)
r = r + 1
Next
Next
For i = 65 To 90
For u = 65 To 90
For o = 65 To 90
Cells(r, 1) = Chr(i) & Chr(u) & Chr(o)
r = r + 1
Next
Next
Next
End Sub
從 AAA-ZZZ 下面這個就可以了。
Sub sdgs()
r = 1
For i = 65 To 90
For u = 65 To 90
For o = 65 To 90
Cells(r, 2) = Chr(i) & Chr(u) & Chr(o)
r = r + 1
Next
Next
Next
End Sub
上一篇男士如何保養皮膚