+ Reply to Thread
Results 1 to 5 of 5

how to create list of 4 numbers that add up to 30

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    Durban
    MS-Off Ver
    Excel 2003
    Posts
    2

    how to create list of 4 numbers that add up to 30

    Hi

    Can this be done in Excel 2007?

    Im trying to create a list of 4 different all numbers that add up to 30. I want to be able to click the first 2 numbers the when clicking the 3rd number it will hyperlink to a list of about 200 results. eg I click 5, 8 , 10 . When clicking the 10 it must goto the the hyperlink. the 7 must be automatically added. so 5 8 10 7 will now link to 1 of 200 results. The list will start with 1,1,1,27 then 1,1,2,26 and 1,1,3,25 then continue until i have all combinations.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to create list of 4 numbers that add up to 30

    I believe this requires VBA.

    Do you want all permutations, or all combinations? That is, do you consider

    1,1,1,27

    to be the same as

    27,1,1,1

    (combination) and should not be duplicated? Or do you want them both (permutation)?

    Are you asking about how to do the linking you described, or just how to generate a list of numbers? I'm not clear on what you're trying to do with the linking.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    MUMBAI
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    85

    Re: how to create list of 4 numbers that add up to 30

    Hi,

    Is this anywhere close to what you want???
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-10-2014
    Location
    Durban
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: how to create list of 4 numbers that add up to 30

    @6StringJazzer I found all the combinations that I wanted from http://www.mathsisfun.com/combinator...alculator.html . I imported the file into Excel and removed the combinations that didn't add up to 30. I have attached the file that I created. On the selection tab i want to be able to select the 3 numbers by clicking on each number. On the combo tab all the combintions are there. After this combo I will manually add 9 numbers. I want to be able the see the 9 numbers and the info next to it from the final tab.

    If i click 1 1 1 on the selection tab the then it should know the last number is 27. @vipul.halbe I dont want a drop down menu to select the numbers. It must then read the 9 numbers after the combo and pull the info from the final tab.
    Attached Files Attached Files

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to create list of 4 numbers that add up to 30

    The file is helpful but I don't see where you want the final result. Where do you want the 9 bits of info to show up?

    Quote Originally Posted by Silid View Post
    i want to be able to select the 3 numbers by clicking on each number.
    I don't understand how you want this to work. You want to select three numbers by simply clicking on each one? That definitely requires VBA. How do you want the user to be able to see what three numbers he clicked on? If you have to click on three numbers, why do you have three columns? You could just click three times on the same column of numbers, in the desired order. (vipul.halbe's suggestion is how I would set this up, but you seem to rule that out.)

    How do you want errors handled? That is, what happens if the user selects 27, 27, 27?

    By the way, based on your data you are using permutations, not combinations. For example, the following sets exists:

    1,1,1,27
    1,27,1,1
    1,1,27,1
    27,1,1,1

    These four numbers are four permutations of a single combination.

+ 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. Replies: 3
    Last Post: 11-22-2013, 05:06 PM
  2. Create a list of the sum of random numbers
    By tddavid89 in forum Excel General
    Replies: 2
    Last Post: 11-08-2012, 03:17 AM
  3. Replies: 2
    Last Post: 08-01-2012, 01:24 PM
  4. A better way to create list (alphabet, numbers, etc).
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-16-2011, 08:59 AM
  5. Create a new list that singles out duplicate numbers
    By moglione1 in forum Excel General
    Replies: 1
    Last Post: 08-18-2005, 02:05 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