PDA

View Full Version : Combination



atuljadhavne
05-14-2012, 03:22 AM
Dear expert i have open invoice amount, now i got payment of Rs. 954019.00
but don't have invoice details but it is conform that it is from mentioned combination amount, i wan that combination which total match to payment amount

in this example the payment come from this combination (326889+199858+109184+205457+112631) = 954019

99493
131746
194103
326889
71127
89253
199858
109184
91706
81109
205457
59084
112631

stanleydgrom
05-14-2012, 05:15 AM
atuljadhavne,

See:

Which numbers add up to a specific total
VBA Sub by Harlan Grove.
http://www.tech-archive.net/Archive/Excel/microsoft.public.excel.worksheet.functions/2009-01/msg04130.html (http://www.tech-archive.net/Archive/Excel/microsoft.public.excel.worksheet.functions/2009-01/msg04130.html)

Find a set of amounts that match a target value
http://www.tushar-mehta.com/excel/templates/match_values/index.html#VBA_multiple_combinations


Have a great day,
Stan

Aussiebear
05-14-2012, 05:22 AM
Have a look here to see if this can be adapted to your needs.

http://www.mrexcel.com/pc09.shtml

The winner of the competition wrote an extensive couple of sections of code.