+ Reply to Thread
Results 1 to 4 of 4

Changing conditional average formula to conditional sumproduct

  1. #1
    Registered User
    Join Date
    02-15-2006
    Posts
    15

    Changing conditional average formula to conditional sumproduct

    Hi,

    I'm stuck with the following problem:

    Turning this formula:

    {=AVERAGE(IF($M$2:$M$10000>='hele utvalget'!$T$4;(DAYS360('hele
    utvalget'!$T$4;($M$2:$M$10000))/360)))}

    Into a conditional sumproduct formula where the above expression are to be weighted with a second row, fex. f2:f10000

    ie. something like this:

    {=SUMPRODUCT(IF($M$2:$M$10000>='hele utvalget'!$T$4;(DAYS360('hele utvalget'!$T$4;($M$2:$M$10000))/360));(F2:10000))/SUM(F2:10000)}

    My problem is to have the correct cells picked out in the "F-list", rather than weighting the whole list.

    I would greatly appreciate any help you can give!

    Thanks
    Christian

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try either (not sure which will work better for you):
    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-15-2006
    Posts
    15
    Hi, thanks for the swift reply!

    However, I still don't get thge right answer. It seems the answer this function returns doesn't weight the F column, only sums it up.

    I need all the entries in M that is returned after the condition set forth in the formula, to be weighted with the F-column.

    The answers from the M column are lease contracts still running after a certain date, measured in years. The number of years left running for each entry should be weighted with the area of the lease contract (F column).

    The answer I get with the conditional SUM formula is wrong, although I can't figure out exactly where your proposed formula goes wrong.

    My problem with the sumproduct formula I put forth above is that it takes into account the whole F-column, not only those entries where the contract is still running.

    Hope this gives you some more input to solve this issue. And thanks again for your help!

    regards
    Christian

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You would need to post a sample zipped file (Xl2003 or earlier) here and show expected results (and how they are gotten).

+ Reply to Thread

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