Este Código VBA: Listeleri Excel'e göre değiştirilemez, önceden değiştirilemez, biçimlendirilemez, 'MsgBox' ve ab'nin ilk sıralarında yer alır. olası bir değişiklik bir değişiklik yok.
Sai 'MsgBox "çok fazla permütasyon!", vbInformation, "Kutools for Excel"'
Entra 'seleção de 1 coluna/linhas.
örnek
linhas selecionadas 12345678 permutar 5 das 8 süreklilik como esta kodigo yok.
gel 12345
87654 numaralı terminal.
Sai 'MsgBox "çok fazla permütasyon!", vbInformation, "Kutools for Excel"'
Entra 'seleção de 1 coluna/linhas.
örnek
linhas selecionadas 12345678 permutar 5 das 8 süreklilik como esta kodigo yok.
gel 12345
87654 numaralı terminal.
'Sub
GetString()
'Updateby Extendoffice
Dim
xStr
As
String
Dim
FRow
As
Long
Dim
xScreen
As
Boolean
xScreen = Application.ScreenUpdating
Application.ScreenUpdating =
False
xStr = Application.InputBox(
"Enter text to permute:"
,
"Kutools for Excel"
, , , , , , 2)
If
Len(xStr) < 2
Then
Exit
Sub
If
Len(xStr) >= 8
Then
MsgBox
"Too many permutations!"
, vbInformation,
"Kutools for Excel"
Exit
Sub
Else
ActiveSheet.Columns(1).Clear
FRow = 1
Call
GetPermutation(
""
, xStr, FRow)
End
If
Application.ScreenUpdating = xScreen
End
Sub
Sub
GetPermutation(Str1
As
String
, Str2
As
String
,
ByRef
xRow
As
Long
)
Dim
i
As
Integer
, xLen
As
Integer
xLen = Len(Str2)
If
xLen < 2
Then
Range(
"A"
& xRow) = Str1 & Str2
xRow = xRow + 1
Else
For
i = 1
To
xLen
Call
GetPermutation(Str1 + Mid(Str2, i, 1), Left(Str2, i - 1) + Right(Str2, xLen - i), xRow)
Next
End
If
'End
Sub