Finding a value by adding certain sums in a range?

G

Guest

I have 20-odd cells in a row with various numbers. Let's say the first three
numbers are as follows:

A1 100
A2 700
A3 800

I'm trying to find a formula that would search through a range of cells and
find a set of numbers that add up to a specific total, and return the cell
numbers. For example, if I wanted to find a combination of cells that add up
to 1500, the formula would return either the cell numbers (A2 A3) or the
contents of the cells (700 800). Is there any formula out there that does
something like this?
 
G

Guest

not easily
for just 20 items you can do it by putting the numbers in one column
copying them and pasting into another column.
copying the data in the two columns and pasting into a 2 x X^2 block of cells.
select one of the columns and sort. then in a third column sum up the two
adjacent numbers and look for the total that you need. Most of the time this
situation requires you to look for more than 2 to total and more than 20 items
up to 4 combinations of 100 items would require looking at about 100 million
combinations. (I started one of these one times on a lrge data base and after
stopping it, calcuated it would have taken about 38 years to look at all
ossible combinations on the computer I was using)

in other words there is not a standard formula to do this.
 

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