I have a column with 25 values in it. I would like excel to SUM eight of
these cells to a total value of 360 or less. The eights cells needs to
be identified and the total must be as close a possible to 360. Is this
function possible in excel?--
galbertse
------------------------------------------------------------------------
galbertse's Profile: www.excelforum.com/member.php...oamp;userid=32383
View this thread: www.excelforum.com/showthread...hreadid=521472Do you need exactly 8 numbers. Suppose we can reach 360 by only adding two
or three?
--
Gary's Studentquot;galbertsequot; wrote:
gt;
gt; I have a column with 25 values in it. I would like excel to SUM eight of
gt; these cells to a total value of 360 or less. The eights cells needs to
gt; be identified and the total must be as close a possible to 360. Is this
gt; function possible in excel?
gt;
gt;
gt; --
gt; galbertse
gt; ------------------------------------------------------------------------
gt; galbertse's Profile: www.excelforum.com/member.php...oamp;userid=32383
gt; View this thread: www.excelforum.com/showthread...hreadid=521472
gt;
gt;
Yes it needs to be eight numbers--
galbertse
------------------------------------------------------------------------
galbertse's Profile: www.excelforum.com/member.php...oamp;userid=32383
View this thread: www.excelforum.com/showthread...hreadid=521472quot;galbertsequot; wrote:
gt; I have a column with 25 values in it. I would like excel
gt; to SUM eight of these cells to a total value of 360 or less.
gt; The eights cells needs to be identified and the total must
gt; be as close a possible to 360. Is this function possible in excel?
With VBA, quot;anythingquot; is possible in Excel. The question is:
how much pain can you tolerate?
First, you need to look more than 1.08 million combinations
of 8 out of 25 values to find an answer. I think that requires
VBA.
Second, your requirements are unclear, and that affects the
potential complexity of any (VBA) solution.
For example, what do you mean by quot;the cells need to be
identifiedquot;? Do you mean the 8 values? Or do you want
the cell references (locations)?
Also, if there are multiple solutions (e.g. 4 sets of 8 that all
sum to 360), is it sufficient to output just one? Or do you
want them all? The latter could complicate usability -- the
ease with which you can use any (VBA) solution because
the size of the result is unpredictable.
Finally, where do you want the solution put? Do you want
a function that puts the result into the spreadsheet? Or is
it sufficient to display the results in a pop-up (msgbox)?
- Aug 28 Tue 2007 20:39
calculate values
close
全站熱搜
留言列表
發表留言