+ Reply to Thread
Results 1 to 6 of 6

Need help with sum formula to add x largest numbers

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Need help with sum formula to add x largest numbers

    I need help writing a formula to sum the six largest numbers from a row of numbers. I have used the array formula "=SUM(LARGE(E2:M2,{1,2,3,4,5,6}))" and it works for rows that have six or more numbers; however, not all of my rows always have six or more numbers. Rows that have less than six result in "#NUM!". Does anyone have suggestion to solve the problem?

    Thank you for your help.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,074

    Re: Need help with sum formula to add x largest numbers

    Here, try this (normal enter):

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,686

    Re: Need help with sum formula to add x largest numbers

    =if(counta(E2:M2)<6,sum(e2:M2),SUM(LARGE(E2:M2,{1,2,3,4,5,6})))

    Try this formula
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Registered User
    Join Date
    07-06-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need help with sum formula to add x largest numbers

    That works very well, thank you! Love this forum, always helpful answers.

  5. #5
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: Need help with sum formula to add x largest numbers

    Your original formula will work if you force all cells in the range to have a number:

    =SUM(LARGE(E2:M2+0,{1,2,3,4,5,6}))

    Use ctrl+shift+enter to confirm the formula.
    Last edited by clabulis; 08-24-2014 at 07:57 PM.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Need help with sum formula to add x largest numbers

    This seems to work

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Oh, nuts....Excel 2003

    Instead of SUMPRODUCT, SUM should work: (Array entered - Ctrl + Shift + Enter)

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 08-24-2014 at 05:16 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] average of kth largest numbers in an array of n numbers
    By georgeb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  2. formula: average of kth largest numbers in an array of n numbers
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 09:05 AM
  3. [SOLVED] average of kth largest numbers in an array of n numbers
    By georgeb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  4. average of kth largest numbers in an array of n numbers
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 05:05 AM
  5. [SOLVED] average of kth largest numbers in an array of n numbers
    By georgeb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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