+ Reply to Thread
Results 1 to 7 of 7

Generate Combinations

  1. #1
    Registered User
    Join Date
    08-14-2015
    Location
    Mumbai
    MS-Off Ver
    2007
    Posts
    13

    Generate Combinations

    There are 4 different values A,B,C,D and seven columns (1-7). How to fill all possible combinations i.e. 7^4 I guess. e.g AAAAAAA,AAAAAAB ...

    So there will be 2401 rows with all possible combinations

    Thanks
    Last edited by subrato312; 05-03-2017 at 08:09 AM.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Generate Combinations

    So AAAAAAB is the same as BAAAAAA ?
    because if not then you are not simply looking for combinations, and it will result in 16384 values.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Generate Combinations

    If the position of the B in the above does matter, meaning AAAAAAB and AAAAABA are different, then this code ought to work:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406

    Re: Generate Combinations

    Here's a non-VBA spreadsheet formula based solution that seems like it should work: https://www.excelforum.com/tips-and-...ml#post4640511
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    08-14-2015
    Location
    Mumbai
    MS-Off Ver
    2007
    Posts
    13

    Re: Generate Combinations

    Thank you so much

  6. #6
    Registered User
    Join Date
    08-14-2015
    Location
    Mumbai
    MS-Off Ver
    2007
    Posts
    13

    Re: Generate Combinations

    Yeah its 4^7=16384 Thanks!!!

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Generate Combinations

    Happy to help

+ 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 Combinations Using VBA
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-06-2021, 01:10 AM
  2. [SOLVED] generate combinations
    By H.Merlow in forum Excel General
    Replies: 3
    Last Post: 08-04-2016, 05:14 PM
  3. generate combinations
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2016, 05:31 AM
  4. Generate all possible combinations
    By muttleychess in forum Excel General
    Replies: 7
    Last Post: 09-22-2014, 02:39 PM
  5. how to generate combinations in excel
    By kunal2490 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-26-2014, 08:20 AM
  6. Generate a table of all possible combinations
    By ElectroZman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2013, 09:17 PM
  7. Generate combinations
    By cjt_choccy in forum Excel General
    Replies: 6
    Last Post: 11-20-2011, 02:51 PM

Tags for this Thread

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