Skip to main content

Easily find all combinations that equal a given sum in Excel

Author: Siluvia Last Modified: 2024-11-15

Kutools for Excel

Boosts Excel With 300+
Powerful Features

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.

shot make up a number 02

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:

shot make up a number 04

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.

shot make up a number 05

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

shot make up a number 06

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:

shot make up a number 07

Result:

shot make up a number 08

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

shot make up a number 09

And you will get the result as below screenshot shown:

shot make up a number 10

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: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download 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 30 days.

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase