Match Payments to Deposits

D

David Smith

Hi Folks,

If column A has a series of numbers and column B has one number which is the
sum of specific numbers (cells) in column A is there a way to find out which
cells on A add up to the one number in B?

Thanks for any clues as to how to do this....


David S>
 
M

Maistrye

David said:
Hi Folks,

If column A has a series of numbers and column B has one number which
is the
sum of specific numbers (cells) in column A is there a way to find out
which
cells on A add up to the one number in B?

Thanks for any clues as to how to do this....


David S>

What you're looking for is a subset sum.

Check out this thread from one of the other newsgroups:

http://www.excelforum.com/showthread.php?t=563728

You may also want to look around to see if there are any other articles
related to subset sum in one of the excel newsgroups.

HTH

Scott
 
D

David Smith

Maistrye said:
What you're looking for is a subset sum.

Check out this thread from one of the other newsgroups:

http://www.excelforum.com/showthread.php?t=563728

You may also want to look around to see if there are any other articles
related to subset sum in one of the excel newsgroups.

HTH

Scott

Hi Scott,

Thanks for the answer. How do I actually get this to work? I copied the code
into excel vba project, put a bunch of numbers in A1:A22, then in B1 put in
the formula =findanswer(?,?) -what are the arguments? How do I get it to
execute?

Thanks for you help....

David S>
 
M

Maistrye

David said:
Hi Scott,

Thanks for the answer. How do I actually get this to work? I copied th
code
into excel vba project, put a bunch of numbers in A1:A22, then in B
put in
the formula =findanswer(?,?) -what are the arguments? How do I get i
to
execute?

Thanks for you help....

David S>

Basically, you have to run the macro. It's not a function. (althoug
i have code for that somewhere)

Alt-F8 is the short cut.

Select the SubsetSum, and run it. If the numbers add up, this will pu
a 1 in column B beside every number that adds to the value you'r
looking for (if possible).

If you need more info, just say so. If you aren't all that familia
with macros, modification to suit your needs is probably going to tak
you quite some time.

(Can't guarantee a quick response right now)

Scot
 
Top