Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Combine two cells (numbers) but not add | Excel Discussion (Misc queries) | |||
Combine 6 Worksheets to 1 Worksheet with total amounts | Excel Worksheet Functions | |||
Can excel find a sequence of numbers from a known total? | Excel Discussion (Misc queries) | |||
Can excel find a sequence of numbers from a known total? | Excel Worksheet Functions | |||
how do i sum a total in excel with numbers and text 58kg + 60kg | Excel Discussion (Misc queries) |