ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Finding combinations that add up to X (https://www.excelbanter.com/excel-discussion-misc-queries/82060-finding-combinations-add-up-x.html)

mj6987

Finding combinations that add up to X
 

Hello,
If I have a long list of numbers (both + and -) on a spreadsheet, is
there a way of finding possible combinations of two or more of these
numbers that add to to a certain figure?

Thanks v much,
Matthew


--
mj6987
------------------------------------------------------------------------
mj6987's Profile: http://www.excelforum.com/member.php...fo&userid=3526
View this thread: http://www.excelforum.com/showthread...hreadid=530831


Bob Phillips

Finding combinations that add up to X
 
See this post by Niek Otten a couple of days ago http://tinyurl.com/mngpm

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"mj6987" wrote in
message ...

Hello,
If I have a long list of numbers (both + and -) on a spreadsheet, is
there a way of finding possible combinations of two or more of these
numbers that add to to a certain figure?

Thanks v much,
Matthew


--
mj6987
------------------------------------------------------------------------
mj6987's Profile:

http://www.excelforum.com/member.php...fo&userid=3526
View this thread: http://www.excelforum.com/showthread...hreadid=530831




[email protected]

Finding combinations that add up to X
 
Hello,

I suggest to look he http://michael-schwimmer.de/vba096.htm

It is a nice beautification of Mr. Excel's winning solution of his
challenge of the month (August 2002): http://www.mrexcel.com/pc09.shtml


And it seems to be quicker than the other solution (I tested with
Michael's example).

HTH,
Bernd


Bob Phillips

Finding combinations that add up to X
 
That's because Harlan's solution is more generic than that, it finds all
combinations that will satisfy the sum, not just one.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
Hello,

I suggest to look he http://michael-schwimmer.de/vba096.htm

It is a nice beautification of Mr. Excel's winning solution of his
challenge of the month (August 2002): http://www.mrexcel.com/pc09.shtml


And it seems to be quicker than the other solution (I tested with
Michael's example).

HTH,
Bernd





All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com