+ Reply to Thread
Results 1 to 3 of 3

using sumif and rank formulas together...

  1. #1
    Forum Contributor
    Join Date
    09-28-2007
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    120

    using sumif and rank formulas together...

    Hello all,

    I have a list of "weights" in column H. They can all be ranked from 1 to 30 (none are exactly the same). I want to write 1 formula that sums the top 10 (biggest) weights without having to make another column for "weight rank". I tried the following as an array formula, but it didn't work....

    =SUMIF($H$3:$H$32,RANK($H$3:$H$32,$H$3:$H$32)&">=10")

    Any ideas?

    Thanks
    Last edited by MCCCLXXXV; 04-08-2009 at 08:29 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: using sumif and rank formulas together...

    Maybe

    =SUM(LARGE(H3:H32,{1,2,3,4,5,6,7,8,9,10}))

    or

    =SUM(LARGE(H3:H32,ROW(INDIRECT("H1:H"&MIN(10,COUNT(H3:H32))))))
    committed with CTRL + SHIFT + ENTER

    The latter is Volatile and CSE array but will adapt should you have less than 10 numbers (assumes min of 1)

    EDIT...

    Another alternative would be to use SUMIF in conjuction with RANK & COUNT, eg:

    =SUMIF(H3:H32,">="&LARGE(H3:H32,MIN(10,COUNT(H3:H32))))

    This would be better than the CSE IMO..
    Last edited by DonkeyOte; 04-07-2009 at 05:34 PM.

  3. #3
    Forum Contributor
    Join Date
    09-28-2007
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    120

    Re: using sumif and rank formulas together...

    awesome that last formula is perfect. thanks

+ 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