Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 175
Default how to get excel to combine numbers to a given total

try using the Solver add-in

Assuming your numbers are in column A . Then, in column B, put zeroes in
every cell next to the values in column A. In C1,put the formula
=SUMPRODUCT($A$1:$A$8,$B1:$B$8), adjust your ranges.

Now in the Solver, in the first dialogue box, enter $C$1 as your Set Target
Cell
and Equal to a Value of 18
In the By Changing Cells box, enter $B$1:$B:$8
click add under Subject to the constraints of:
in Cell reference put : $b$1:$b$8
from dropdown select Bin, click OK and click Solve, Keep solver solution
and look at the table, its should return as :

9 0
12 0
7 0
4 0
15 1
8 0
10 0
3 1


If there is a correct answer, the cells in $b$1:$b$8 will change to 1
instead of 0, and you will have your answer. This usually works, but is
subject to the following constraints, firstly, it is better with a short
lists of numbers, and secondly, if there is more than one solution, it will
only give you the first one it finds



--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked


Thank You

cheers, francis










"karlo" wrote:

Thank you for your assistance.

I receive a list of numbers. I need to find
out which amounts will add up to a given total. How would I create a macro
to do this? Is there already an Excel function to do this that I have not
found? It would need to work with currency.

Ex: 9, 12, 7, 4, 15, 8, 10, 3 total needed 18
Solution 8+10; 3+15


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Combine two cells (numbers) but not add evoxfan Excel Discussion (Misc queries) 7 October 8th 08 04:57 PM
Combine 6 Worksheets to 1 Worksheet with total amounts Ms. D Excel Worksheet Functions 1 July 23rd 08 04:16 AM
Can excel find a sequence of numbers from a known total? efandango Excel Discussion (Misc queries) 16 February 15th 07 11:40 PM
Can excel find a sequence of numbers from a known total? efandango Excel Worksheet Functions 16 February 15th 07 11:40 PM
how do i sum a total in excel with numbers and text 58kg + 60kg Bryan Excel Discussion (Misc queries) 4 November 22nd 05 11:46 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"