+ Reply to Thread
Results 1 to 10 of 10

Generate all letters all cases

  1. #1
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Generate all letters all cases

    Hi VBA experts
    the word "cat" has three letters. In the output, there will be three columns, first for the possible cases of one letter, second for the two letters, third for the three letters
    column A:
    c
    a
    t

    column B:
    ca
    ct
    ac
    at
    ta
    tc

    column C:
    cat
    cta
    act
    atc
    tac
    tca

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,410

    Re: Generate all letters all cases

    With cell D1 contains string
    HTML Code: 
    Attached Files Attached Files
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Generate all letters all cases

    Thanks a lot sir
    I tested with three letters and that's OK, but when testing with word of four letters "cats", I got only three columns in the output
    the number of columns is equal to the number of letters, so output should four columns for word "cats"

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,410

    Re: Generate all letters all cases

    What maximum is letters number?

  5. #5
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Generate all letters all cases

    The max letters are seven letters

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,410

    Re: Generate all letters all cases

    If letters number is not fixed (from 1 to 7), I got stuck.
    If 7 lettes, we need 7 "for loop"
    But, for 5 letter, we need 5 "for loop".
    I dont know how to nest all in one code.

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Generate all letters all cases

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  8. #8
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Generate all letters all cases

    Thanks a lot, sir karedog. Working like charm.

  9. #9
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Generate all letters all cases

    You are welcome, thanks for marking the thread as solved and rep.points given.

    Regards

  10. #10
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Generate all letters all cases

    it's a variation on this problem ... https://www.excelforum.com/excel-pro...d-problem.html
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by bsalv; 08-11-2022 at 03:08 AM.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Generate every value between two values (letters and numbers)
    By benexclaimed in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-04-2024, 04:54 PM
  2. How to generate letters as attached
    By gaby58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2019, 12:41 PM
  3. hello, generate all combinations of at most 3 by letters,
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2019, 07:19 PM
  4. [SOLVED] Request = generate the maximum formations 3 letters of the 10 letters
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2017, 09:20 PM
  5. [SOLVED] Coloring cell letters based on text cases
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-01-2017, 08:14 AM
  6. Generate all possible combinations between 3 letters
    By rcprito in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-18-2015, 05:47 PM
  7. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1