Anagrams

  • Thread starter Thread starter cradino
  • Start date Start date
C

cradino

My name is not Cradino.
Cradino is an anagram of my name "arcindo".
Who can help me developing a formula or a macro to make excel generat
combinations with all anagrams of my name??????????
Thank
 
This was subject of discussion months ago. Do a Google newsgroup search to
locate messages.
You know that with 7 no-repeating letters you will get 7! = 5040 answers?
Did you know 'carthorse' and 'orchestra' are anagrams?
 
arcindo

User defined function for you....

Function SCRAMBLE(text, Optional recalc)
' Scrambles its single-cell argument
' If second argument is 1, then recalc it each time sheet is calculated
Dim Num As Integer, i As Integer, rpos As Integer
Dim temp As String, text2 As String
If IsMissing(recalc) Then recalc = 0
If recalc Then Application.Volatile
If IsArray(text) Then text2 = text(1) Else text2 = text
Num = Len(text2)
For i = 1 To Num
temp = Mid(text2, i, 1)
rpos = Int((Num - 1 + 1) * Rnd + 1)
Mid(text2, i, 1) = Mid(text2, rpos, 1)
Mid(text2, rpos, 1) = temp
Next i
SCRAMBLE = text2
End Function

Usage is =SCRAMBLE(cellref) or =SCRAMBLE(acrindo)

If you want result to be re-scrambled each time the sheet calculates....

=SCRAMBLE(arcindo,1)

Another method is by macro.........See John Walkenbach's site for code or a
downloadable workbook.

http://j-walk.com/ss/excel/tips/tip46.htm


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top