Alphabetical sorting macro for word letters

JR -  
JR17200 Posted messages 11 Status Member -
Hello,

I was looking for how to sort a word like BOUM and get BMOU.
I had found the macro but it is no longer available.

Thank you for your help

Best regards

J Racary

3 answers

  1. ccm81 Posted messages 11033 Status Member 2 434
     
    Hello

    trimot is a custom function (macro) that works like an Excel function.
    Press Alt-F11 to access the code, it's in Module 1
    If you transpose it into your file
    Press Alt-F11 to access the VBA editor
    Insert/Module to create Module 1
    You should copy all the code there
    I assume your version of Excel is later than 2007
    In that case, save your file with the .xlsm type (Save as/ Type/ ... considering macros)

    Have a nice day
    1
    1. JR17200
       
      Hello

      Thank you for your response.
      My version of Office is Office 2016.
      I have saved it as xlsm ????????
      I will take a look at the code.

      Have a nice day
      0
    2. JR17200
       
      The ???? typing error
      I have a new idea
      Compare the base of 7 letters and that of 8
      I type a 7-letter word and in result I have the supporting letters that give 8L

      Ex

      7L

      CABANES. Gives + E CABANEES
      + L BALANCES
      BANCALES
      + T BACANTES
      CABESTAN

      VERDETS. Gives + A DEVASTER
      DEVERSAT
      + I VERDITES

      In the end, it’s about comparing the 7L word and displaying all 8L words that contain all the letters 7 of the 7-letter word.

      What do you think please?
      Thank you for your listening and have a nice afternoon

      Jean
      0
    3. via55 Posted messages 14393 Registration date   Status Member Last intervention   2 759 > JR17200
       
      Hello Jean

      I think you’re a scrabble player like me given what you’re trying to do
      It’s perfectly possible with Excel I believe as long as you have a database of all 7-letter words and all 8-letter words and create a suitable little macro.
      Do you want me to take a look at that?

      Best regards
      Via
      0
    4. JR17200 > via55 Posted messages 14393 Registration date   Status Member Last intervention  
       
      Hello Via

      Indeed, I am a retired Scrabble player.
      And I have both word lists of 7 and 8 letters.

      I’d be happy for you to take a look at that.
      Do you need both lists?
      I have both of the new words from the latest ODS8.

      Thank you for your attention.
      Have a good day.

      Jean
      0
    5. via55 Posted messages 14393 Registration date   Status Member Last intervention   2 759 > JR17200
       
      Hello Jean

      I would like you to send me the 2 databases, I have them too but it will be good to compare them
      Have a nice day as well
      Via
      0
  2. ccm81 Posted messages 11033 Status Member 2 434
     
    1. In the end, it's comparing the 7-letter word
    ???? and it's not a typo ;-)

    2. and displaying all the 8-letter words that contain all the letters from the 7-letter word.
    Starting from the 7-letter word, we will assume that all letters are different for simplicity
    we can generate the list of all permutations of these 7 letters, there are a maximum of 5040
    If we add 1 letter there are 8 ways to insert it into each of the 5040 permutations
    And since there are 26 possible letters to insert
    that gives us 5040*8*26 = 1,048,320 "words" of 8 letters possible, of which 2 or 3 will make sense!
    And Excel cannot guess if a sequence of 8 letters makes sense or not

    So ....
    1
    1. JR17200
       
      1 typing error in my message on saved in xlm.

      2. I understand that it's unfeasible with Excel.
      Thank you for your attention and your response.
      Maybe with a database manager... SQL?!

      Good evening.
      0
    2. JR17200
       
      I just understood your 1 ;)
      It has nothing to do with my xlm recording ;)

      Read too quickly ;)
      0
  3. ccm81 Posted messages 11033 Status Member 2 434
     
    Hello

    A solution
    https://mon-partage.fr/f/pxgGOq9d/

    NB: Distinguish between uppercase and lowercase letters

    Best regards
    0
    1. JR17200
       
      Good evening
      Thank you very much!!
      Thanks to your help, I was able to break down all the new words from 2 to 9 letters with your macro.
      Did you possibly use VBA to create your macro?
      In any case, I now have a fantastic training base that I've enhanced with conditional formatting.
      Thanks again and have a good evening.
      Jean
      0