Note: The other languages of the website are Google-translated. Back to English
English English

Easily find all combinations that equal a given sum in Excel

Supposing, there is a list of numbers (whole numbers, decimal numbers or negative numbers), and now, you want to find all possible combinations from these numbers that equal a given sum. Normally you can use formulas, Solver Add-in or User-defined function to achieve it, but it is time-consuming and not easy to handle. Here with the useful Make Up a Number utility of Kutools for Excel, finding all combinations that equal a given sum has never been so easy in Excel.

Find all combinations that equal a given sum


Find all combinations that equal a given sum

As the below screenshot shown, to find all possible combinations of numbers in range B3:B11 that sum up to 520, you can try with the Make Up a Number utility as follows.

1. Click Kutools > Content > Make Up a Number.

shot make up a number 03

2. In the Make up a number dialog box, please do the below settings.

  • In the Data Source box, select the number list to find which numbers add up to 520;
  • In the Options section, enter 520 into the Sum textbox;
  • Click the OK button. See screenshot:

3. In the next Make up a number dialog box, select a cell to output the combinations and click the OK button. Then a Kutools for Excel dialog pops up to tell you how many combinations will be created, click OK.

You can see all possible combinations of selected numbers that sum up to 520 are listed as follows.

Notes:

1. It is optional to specify the number of combinations and number of elements in each combination instead of generate all combinations. As the below screenshot shown, you can specify number of combinations as 4, and specify number of elements in each combination from 1 to 4, then, you will get the following result:

Result:

2. This powerful feature also can be applied to decimal and negative numbers, see screenshot:

And you will get the result as below screenshot shown:

3. You can check the Save in a new sheet box to output the combinations to a new sheet.


Find all combinations that equal a given sum

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Download the free trial now!


Productivity Tools Recommended
The following tools can greatly save your time and money, which one is right for you?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: More than 300 Advanced Functions for Excel 2021, 2019, 2016, 2013, 2010, 2007 and Office 365.

Kutools for Excel

The functionality described above is just one of 300 powerful functions of Kutools for Excel.

Designed for Excel(Office) 2021, 2019, 2016, 2013, 2010, 2007 and Office 365. Free download and use for 60 days.

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
È possibile escludere delle combinazioni da quelle trovate ?
This comment was minimized by the moderator on the site
instead of "processing, please wait" it needs to have a counter which displays either how much time is estimated to be remaining to calculate or an actual counter of the calculations done and remaining to be counted. ie i have waited over 4 hours for the program to work out my 44C8 query (177m combinations) but i don't know whether the program has crashed or is still calculating.
This comment was minimized by the moderator on the site
Still going after another 6 hours (10hrs all up). i assume it has crashed and will force close the program.
This comment was minimized by the moderator on the site
ok just tried a 35C8 and it took just over 90mins, so maybe 44C8 takes 11.5hrs.
This comment was minimized by the moderator on the site
Anyone able to get this to work? The Processing please wait is taking forever.. Don't want to cancel

This comment was minimized by the moderator on the site
I'm having this problem! Did you get it to work?
This comment was minimized by the moderator on the site
Same here. The function gets hung-up when searing more than 1000 numbers. I do see a progress bar, but it continues to get stuck at 6%. I have been using their products for close to a decade; it would be nice if they fixed/improved this. I was told to install latest version. I wouldn't know how to install anything other than the latest version.
This comment was minimized by the moderator on the site
Hi Tony,
Sorry for the convenience and thanks for your support for close to a decade.
Our developers are working on upgrading this feature to have a better and fast way to deal with big data, and it will be avaliable in the next release.
By the way, do the 1000+ numbers you used include positive numbers, negative numbers and decimal numbers? Do you mind send us the sample file for testing via support@extendoffice.com?
This comment was minimized by the moderator on the site
This is so great, Thanks
This comment was minimized by the moderator on the site
Was the bug fixed? What was great? Thank you.
This comment was minimized by the moderator on the site
The bug has not been fixed yet. Even though I select one output, and wait forever for the answer, I still get an error message stating that the tool can't handle more than 1,600+ answers. I did not ask for that many, I asked for *one*.
This comment was minimized by the moderator on the site
Hi Cathy,
Sorry for the convenience and thanks for your support.
Our developers are working on upgrading this feature to have a better and fast way to deal with big data. And the new version will be released soon.
Please stay tuned for our updates!
This comment was minimized by the moderator on the site
There is no "Make up a number" under Content in my Kutools, has this feature been removed?
This comment was minimized by the moderator on the site
Hi Alex Ramaker,
I am sorry for the inconvenience. Can you tell me which Kutools version are you using? If you can't find it under the Content group, please press the Alt + S keys to open the Kutools search box and type in "Make up a number", and then the feature name will be listed under the search box. Just click on it to activate the feature.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/make_up_a_number.png
This comment was minimized by the moderator on the site
I do not know about others, but I still have it.
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations