List of Permutations when 2 letter is taken at a time
Better I think,
Type the word AMERICA in A1 and run this code.
Sub combinations3()
'Perm any 2 from x
mystring = Range("A1").Value
For j = 1 To Len(mystring) - 1
For k = j + 1 To Len(mystring)
Cells(l + 1, 2) = Mid(mystring, j, 1) & Mid(mystring, k, 1)
l = l + 1
Next
Next
End Sub
Mike
"Prem" wrote:
Hi All,
I want to get list of all possible permutations when conditions defined. For
example, I have a word "AMERICA". And I need the list of permutations when
two
letter is taken at a time.
AM
AE
AR
AI
AC
AA
..
..
..
I hope I am clear and I really need your help.
Regards
Prem
|