+ Reply to Thread
Results 1 to 6 of 6

Ranges - list of all possible combinations

  1. #1
    Registered User
    Join Date
    03-04-2008
    Posts
    1

    Ranges - list of all possible combinations

    I am wondering if it is possible (if so, then how) to set up a worksheet where the user inputs a range for high and low and the spreadsheet adjusts accordingly. For example:

    high:6 to 8
    low: 3 to 5

    Based on the high and low, I want to create a list of all possible combinations such as:

    High Low
    6 3
    7 3
    8 3
    6 4
    7 4
    8 4
    6 5
    7 5
    8 5

    Let's suppose the user wants to change the range to say:

    high: 8 to 11
    low: 4 to 7

    Is there a way for excel to adjust to the new range, change the size of the table, and automatically change to:

    High Low
    8 4
    9 4
    10 4
    11 4
    8 5
    9 5
    10 5
    11 5
    8 6
    9 6
    10 6
    11 6
    8 7
    9 7
    10 7
    11 7

    Any help would be appreciated! Thanks.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello stacylynn,

    Welcome to the Forum!

    The attached workbook contains the macro shown below which shows the combinations. The entries are made into cells A3:D3 and a command button runs the macro to display the combinations.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-08-2014
    Location
    Somonauk, IL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Ranges - list of all possible combinations

    So that works great with 2 sets of ranges, how about 5 or 6 sets? and how about letters?

    Example:

    length: 8-121
    depth: 8-15
    # of bowls: 0,1,2,3,4,
    backsplash: nbs, 3bs, 4bs
    color: sy, syss, cy, cyss, gy, gyss

    So in that order meaning number 1 would be 880nbssy then 890nbssy and so on and so forth
    Last edited by bandit6611; 01-30-2015 at 02:52 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Ranges - list of all possible combinations

    bandit, welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-08-2014
    Location
    Somonauk, IL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Ranges - list of all possible combinations

    ok, sorry, new to the posting thing

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Ranges - list of all possible combinations

    After you start your new thread, see the workbook at https://app.box.com/s/47b28f19d794b25511be
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

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