List of Permutations when 2 letter is taken at a time
Hi,
Type AMERICA in column A starting in A1 and ending in A7.The rest of colum A
should be empty. Right click the sheet tab, view code and paste the code
below in and run it. The permutatins will be in column B
Sub combinations2()
'Perm any 2 from x
'Numbers/Text in Column A
last = Cells(Rows.Count, "A").End(xlUp).Row
For j = 1 To last - 1
For k = j + 1 To last
Cells(l + 1, 2) = Cells(j, 1) & Cells(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
|