select cells that sum up to a specific value

D

damorrison

I would like to highlite a range, then
click a button for an input box that asks for a value
then the rows with the cells that add up to that value(or as close to
it), will change to blue,
Has anybody an example of this or know of a way for this to be done??

Thanks
Dave
 
J

JLatham

This could be ugly. Could we have some more rules for this game? Like is
there always going to be a solution? You mentioned "or as close to it" - as
close to it as what, closest? Within some range? How many cells in the
possibles list would there be? Do we stop when we find either an exact match
or the first one that comes close, or do you have to determine no exact match
before finding the next closest one? If you have 10 cells in the range, do
we have to find 2-cell, 3-cell, 4-cell, 5-cell, 6-cell, etc solutions or what?
I think this would have to be solved with VBA code, and depending on the
number of combinations involved, it could take a heck of a long time to find
a result.
 
J

JLatham

Excellent!!

I continue to learn new ways to use SumProduct() and now to combine it with
the Solver.
 
D

damorrison

Hi,
good questions,
With our list of production orders, we know that the next day the
production line will be able to handle $10,000.00 worth of work, when a
user selects a range, inputs the value, and the rows with the cells
that total $10,000.00 will change color. I say (as close to), because
there are cents to deal with and not all orders have the same value...
 
Top