Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"LF.TEN" wrote:
'joeu2004[_2_ Wrote: And do you want "about" 80% (which might be less); or do you want "no less than" 80%? [....] You might start with the VBA code mentioned at http://www.sulprobil.com/html/accoun...e_problem.html. [....] Actually I want to know the fewest items that sum to about 80%. The take-away from my previous posting is: this is a very difficult nut to crack in general, and no simple Excel formula or single function is likely to produce the desired result except by accident or by coincidence. It requires an iterative algorithm, best implemented in VBA, IMHO. Even so, I believe it is a very complex algorithm when designed correctly. Think about it! Imagine that you have an empty box and a set of oddly-shaped malleable shapes of varying size. You might start by picking the largest ones (assuming they fit at all); but eventually you might need to pick some of the smallest ones to fill the remaining space as best as possible. Alternatively, you might find a set of shapes that overflows the box, but by less than the unfilled space with the first set. If you did this manually, there would be a lot of trial-and-error with a lot of intuitive thinking going into the selection criteria. No different for a computer algorithm. Again, start with the aforementioned VBA code. It might do what you want as is; if not, it might provide a good starting point for the desired algorithm. Good luck! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif And Countif | Excel Worksheet Functions | |||
Countif & Sumif | Excel Worksheet Functions | |||
Countif/Sumif | Excel Worksheet Functions | |||
Countif and sumif | Excel Discussion (Misc queries) | |||
Sumif for countif? | Excel Programming |