Excel which numbers sum to target




















Note: The other languages of the website are Google-translated. Back to English. Log in. Remember Me Forgot your password? Password Reset. Please enter the email address for your account.

A verification code will be sent to you. Once you have received the verification code, you will be able to choose a new password for your account. Edit - added set up for defined makeup Comments It seems there is no criteria about "a number must be selected from each category", or "a number must be selected from category X".

Initial Problem Setup From the information you provided in your comment, I put together the following This is the solver setup You could choose Value Of: 0, but if there is no exact answer, it may fail. This forces the values to be either 0 or 1. Select a Solving Method: is set to Evolutionary. GRG Nonlinear can sometimes solve this type of problem, but it takes much longer than Evolutionary.

Finding Near Results Solver is an optimizer, so it will find "the answer" that best fits your objective. Making an Algorithm If you determine criteria for the range of solutions you are looking for, you could setup a VBA sub to loop through setting up Solver, getting the solution, and storing the results of the "Selected Column" for review.

Edit - missed one of your criteria I missed addressing your statement - "the target subset total has a defined makeup: A, B, B, C, C, C, B or C , B or C ,D, E" In this instance, using the setup containing sums for each category, you can specify these constraints Improve this answer. OldUgly OldUgly 2, 3 3 gold badges 12 12 silver badges 21 21 bronze badges. Thanks, OldUgly, very very helpful. This means if your problem gets very larger, you will need another tool.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast The first ten years of our programming lives. Upcoming Events. Featured on Meta. Now live: A fully responsive profile. The problem with these problems is that there are many solutions. In that list, there are 10 3-number combinations that sum to You must log in or register to reply here.

Similar threads A. Replies 3 Views Apr 8, Eric W. JenniferMurphy Sep 30, Excel Questions. Replies 8 Views Oct 1, JenniferMurphy.

Question Most optimal combination. Arek92 Apr 14, Excel Questions. Replies 0 Views Apr 14, Arek Question Finding all combinations of rows in a column which sum to a given total. XL Apr 7, Excel Questions 2. Replies 14 Views Apr 8, XL Question Problem using countifs with a table column.

Nociti Feb 7, Excel Questions. Feb 7, Nociti. We've detected that you are using an adblocker. We have a great community of people providing Excel help here, but the hosting costs are enormous.



0コメント

  • 1000 / 1000