Re: Interesting Programming Problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Al Marino" <almarino_AT_intelliform.net> wrote:

for this particular case (searching for a specific total)
it is better to sort in ascending order, that way you stop
when sum > total
in your example, 10 checks vs 17 (depending how you count)

Read my posting more carefully. I do stop when the sum is too
big. It is just a matter of the order that the elements are
considered.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
.



Relevant Pages

  • Re: how to define "previous" cells?
    ... Can I use a formula that is not depending on location? ... This sum depends on C3? ... But Sort does change C3 as needed when it moves C3. ... with sorting cells with formulas. ...
    (microsoft.public.excel)
  • Re: Possible F77 Code Improvement ??
    ...  > the absolute values in ascending order, ...  > sum the actual values in the new order ... extensively in the summation of very large arrays of mixed elements ...
    (comp.lang.fortran)
  • Re: Pivot Table field selection order
    ... For some reason my Pivot Table Field List selection under "Choose ... add to report:" is sorted in ascending order and not in the order they ... Sum of 1 Apr 2009 ... opportunity to add attachmnets to your posts so you can add workbooks to ...
    (microsoft.public.excel.misc)
  • Re: How can I create a query that does this
    ... The function SUM associated will give you the sums for each field. ... you cannot use the query designer to do this because of the UNION ... > need to display these results in ascending order, ...
    (microsoft.public.access.queries)
  • Sum after Sorting
    ... There is an Excel Spreadsheet like the following ... Project Value Sum ... There is a requirement that we have to sort the first ... column in ascending order but keep the sum still be the ...
    (microsoft.public.excel)