how do i make anagrams of words in excel

  • Thread starter Thread starter Guest
  • Start date Start date
Try this macro:

in a cell put: =anagram(A1) where A1 contains the word.

See for help on macros:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Function anagram(inword) As String

Dim y As String
Dim used() As Boolean
y = ""
ReDim used(Len(inword))
For i = 1 To Len(inword)
repeat:
j = Int(Rnd() * Len(inword) + 1)
If used(j) Then GoTo repeat:
used(j) = True
y = y + Mid(inword, j, 1)
Next i
anagram = y
End Function
 
Sorry .... not a very bright answer (brain not in gear!): this will simply
scramble a word.

To create anagrams, you need (I guess) to look at all possiblities of the
letter combinations and then use the dictionary to validate them. And
anagrams can be formed from a phrase.

So pretty complex I think.

See

http://j-walk.com/ss/jokes/anagrams.htm

for example of possiblities from the word "Spreadsheet"!
 
Back
Top