+ Reply to Thread
Results 1 to 7 of 7

Select the Top 20 within a formula

  1. #1
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195

    Select the Top 20 within a formula

    How can I select the top 20 within a formula so that I can
    =sum( ~~ select top 20 from a range I$56:I100~~ )

  2. #2
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    Quote Originally Posted by Bryan Hessey
    How can I select the top 20 within a formula so that I can
    =sum( ~~ select top 20 from a range I$56:I100~~ )
    Check this out and see if this is what you need ...

    =sumproduct(large($I$56:$I$100,row(1:20)))

    Regards.
    BenjieLop
    Houston, TX

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Worked wonderfully, many thanks

    Bryan

  4. #4
    ScottO
    Guest

    Re: Select the Top 20 within a formula

    Try this ...

    =SUMIF(I$56:I100,">"&LARGE(I$56:I100,21))

    Rgds,
    ScottO

    "Bryan Hessey" <[email protected]>
    wrote in message
    news:[email protected]...
    |
    | How can I select the top 20 within a formula so that I can
    | =sum( ~~ select top 20 from a range I$56:I100~~ )
    |
    |
    | --
    | Bryan Hessey
    | ------------------------------------------------------------------------
    | Bryan Hessey's Profile:
    http://www.excelforum.com/member.php...o&userid=21059
    | View this thread: http://www.excelforum.com/showthread...hreadid=385482
    |



  5. #5
    Max
    Guest

    Re: Select the Top 20 within a formula

    One way ..

    Try: =SUMPRODUCT(--(LARGE($I$56:$I$100,ROW(A1:A20))))

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Bryan Hessey" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > How can I select the top 20 within a formula so that I can
    > =sum( ~~ select top 20 from a range I$56:I100~~ )
    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile:

    http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=385482
    >




  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Scott,
    the
    =SUMIF(I$56:I100,">"&LARGE(I$56:I100,21))
    doesn't work where there are two rows of the same value about the '20' mark.

    Max,
    with the: =SUMPRODUCT(--(LARGE($I$56:$I$100,ROW(A1:A20)))) the $100 needs to be not $ (as $I100), and the A1:A20 need to be $1:$20, otherwise ok

    With BenjieLop's original answer I adjusted the $I$100 and the 1:20 to $1100 and $1:$20 and it formula dragged well.

    Thanks again people

  7. #7
    Max
    Guest

    Re: Select the Top 20 within a formula

    Glad to hear you got it to work,
    and knew how to adapt the references to suit ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



+ 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