How to ID numbers in Excel sheet that add up to specific sum?

K

Kassira

For account reconcilation purposes...

Basically, given a list of up to 50 numbers (each cell contains a number),
the goal is to find 1-5 numbers from that list that add up to a single sum.

So if 5, 10, 15, 20, 1, 2, 18, and 3 were on my list, and I wanted to know
what adds up to 18, it would return the following combinations of numbers
from my list add to 18:

18
5, 10, and 3
5, 10, 1 and 2
15, 1, and 2
15 and 3

I don't need it to identify which cells contain these numbers, just tell me
which numbers from my list add up to the sum I give it. A program to
identify it would be nice, but not necessary.

A few more things:

1.) The program should not use the same cell twice in the caluculation. (So
it should not tell me that 5, 5, 5, and 3 make 18, if 5 is only listed once
in my list. It could if the number 5 occurs in 3 different cells.
2.) I should be able to change how many numbers it tries to combine. (so I
can limit it to only comparing 2 numbers, or increase it up to finding up to
5 numbers that add up to a specific total.)
3. I should be able to control which numbers from the list are compared.
4.) The program should not subtract numbers to get the total requested.

Mission Impossible? Or just complicated? I've heard there's ways to make
solver do this, but I haven't found a solution yet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top