Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default Sumif & Countif

"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
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
Sumif And Countif roter789 Excel Worksheet Functions 7 August 21st 09 12:00 AM
Countif & Sumif JulesHR Excel Worksheet Functions 7 May 29th 08 04:20 PM
Countif/Sumif Cain Excel Worksheet Functions 2 February 12th 06 07:59 PM
Countif and sumif Visual Excel Discussion (Misc queries) 19 August 10th 05 05:59 PM
Sumif for countif? pantelis Excel Programming 5 October 17th 03 11:28 PM


All times are GMT +1. The time now is 03:38 AM.

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"