+ Reply to Thread
Results 1 to 6 of 6

How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

  1. #1
    Registered User
    Join Date
    08-17-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    31

    How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    Hello,

    I am trying to do the following but I can't think on how to do that...

    I need to do the SUM of a column but remove the n largest values. The n value is calculated by another formula..
    SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n}))

    Any idea on how to do that will be more than welcome.

    Thanks
    Ludo

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    Try:

    =SUM(A1:A100)-SUM(LARGE(A1:A100,ROW(INDIRECT("1:"&D1))))

    where D1 contains the "n" value

    You must confirm this formula with CTRL+SHIFT+ENTER not just ENTER
    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
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    Or, alternatively:

    =SUM(A1:A100)-SUM(INDEX(LARGE(A1:A100,ROW(A1:INDEX(A:A,D1))),0))
    confirmed with Enter

  4. #4
    Registered User
    Join Date
    08-17-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    Thanks.

    Erm, I also need to do that with Columns. I try transposing Row by Column but obviously, it does not work :/

    Any idea?

    Thanks
    Ludo

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    With my formula, you only need to change the range A1:A100 to your horizontal range... leave the ROW() function as is and confirm with CSE keys.

    With DO's formula, you need to change the same range(s) and then change ROW to COLUMN and change the A:A in the index to a row reference, like 2:2
    Last edited by NBVC; 03-22-2010 at 01:22 PM.

  6. #6
    Registered User
    Join Date
    08-17-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How-to SUM(A1:A100)-SUM(LARGE(A1:A100,{1,2,..,n})) with n being a variable?

    Quote Originally Posted by NBVC View Post
    With my formula, you only need to change the range A1:A100 to your horizontal range... leave the ROW() function as is and confirm with CSE keys.

    With DO's formula, you need to change the same range(s) and then change ROW to COLUMN and change the A:A in the index to a row reference, like 2:2
    My bad... I did a typo in another part of the formula, while speaking to a customer on the phone and the error in the result was coming from there

    Thanks a lot!
    Ludo

+ 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