Results 1 to 5 of 5

how to sum highest ranking values meeting criteria within a limit?

Threaded View

  1. #1
    Registered User
    Join Date
    06-02-2005
    Posts
    9

    how to sum highest ranking values meeting criteria within a limit?

    Here is a more detailed explanation. I need a function that will sum the n largest values in an array, where the values are less then x and are not #N/A, meet a criteria in a seperate array, and where the total of the sum is less then or equal to y. How can I do this? Thanks.

    For example, here is my data:

    name   type   value
    
    alpha     g     1
    bravo           5
    charlie   g     2
    delta     g     #N/A
    echo            3
    foxtrot   g     7
    I want a function that will find the sum of the largest two values that are "g" that add to 8 or less. So the output would look like:

    name   value
    alpha    1
    foxtrot  7
    
    sum:     8
    Last edited by QuantumPion; 06-02-2005 at 05:41 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1