Results 1 to 2 of 2

VBA to list all possible combinations

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2019
    Location
    Winnipeg
    MS-Off Ver
    Office 365
    Posts
    19

    VBA to list all possible combinations

    I heard that possibilities with VBA are endless. I am a beginner. I need hlep with the folowing problem.
    Cells A1 to G1 can be any number within 1 to 9
    Example:
    A1 B1 C1 D1 E1 F1 G1
    2 3 8 1 9 2 2

    I need a formula or VBA code to list the following possible combinations between number 1 to 50
    In this list, the sum of the digits in a cell is equal the respective cell above in row A1 to G1
    Order is important in each row. It should be increasing from 1 to 50 and numbers should not repeat in the same row.

    2 3 8 10 18 20 29
    2 3 8 10 18 20 38
    2 3 8 10 18 20 47
    2 3 8 10 18 29 38
    2 3 8 10 18 29 47
    2 3 8 10 18 38 47
    2 3 8 10 27 29 38
    2 3 8 10 27 29 47
    2 3 8 10 27 38 47
    2 3 8 10 36 38 47
    2 3 8 19 27 29 38
    2 3 8 19 27 29 47
    2 3 8 19 27 38 47
    2 3 8 19 36 38 47
    2 3 8 28 36 38 47
    2 3 17 19 27 29 38
    2 3 17 19 27 29 47
    2 3 17 19 27 38 47
    2 3 17 19 36 38 47
    2 3 17 28 36 38 47
    2 3 26 28 36 38 47
    2 12 17 19 27 29 38
    2 12 17 19 27 29 47
    2 12 17 19 27 38 47
    2 12 17 19 36 38 47
    2 12 17 28 36 38 47
    2 12 26 28 36 38 47
    2 21 26 28 36 38 47
    11 12 17 19 27 29 38
    11 12 17 19 27 29 47
    11 12 17 19 27 38 47
    11 12 17 19 36 38 47
    11 12 17 28 36 38 47
    11 12 26 28 36 38 47
    11 21 26 28 36 38 47
    20 21 26 28 36 38 47

    Is this possible?

    thanks

    Siva
    Last edited by drgorantla; 10-15-2019 at 04:30 AM.

Thread Information

Users Browsing this Thread

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

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