+ Reply to Thread
Results 1 to 14 of 14

Extract top 4 values and sum

  1. #1
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Extract top 4 values and sum

    I would like help combining the formulas in column R-U, plus column V (which is just the value in column P). Essentially I am trying to sum the 4 largest values from Column A-O plus the value in column P. As you can see I am also running into problems when there are less than 4 values (still need to sum them plus value in column P, even if less than 4 values in A-O.
    Thank you!!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-24-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    45

    Re: Extract top 4 values and sum

    Used below formula to arrive at the result:

    =IFERROR(LARGE($A3:$O3,COLUMN(A$1)),0)

    Please see attachment for details
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,155

    Re: Extract top 4 values and sum

    Alternative;

    Enter the below formula in cell W3 and fill down...

    Please Login or Register  to view this content.

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Extract top 4 values and sum

    Array formula
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: Extract top 4 values and sum

    Thank you for quick replies - I will try each and report back (at work now)

  6. #6
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: Extract top 4 values and sum

    Still having some problems with this - but getting close - thank you for responses. I have tried each. Can I achieve the correct answer (as in column W highlighted in green) with one overall formula, that sums the 4 highest values from column A-O, plus the value in column P, and corrects for the errors when there are less than 4 values in range A:O? I have attached another file - thank you!!

    Having trouble attaching new file - hopefully this question will be clear enough. Will continue to try and attach new version
    Attached Files Attached Files
    Last edited by eugbed; 02-11-2020 at 06:09 PM.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,417

    Re: Extract top 4 values and sum

    eugbed your profile shows Excel 2003 yet the uploads are in formats newer. Your profile seems unlikely.

    Members tailor answers based on your Excel version(s). Please update your profile.
    Thanks

    That said try this in cell W3 and fill down. If it returns errors or clearly wrong answers then try array entering in W3 and filling down.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  8. #8
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Extract top 4 values and sum

    Quote Originally Posted by FlameRetired View Post
    eugbed your profile shows Excel 2003 yet the uploads are in formats newer.
    Office 2007 compatibility pack allow to use new file format.

    eugbed, There are two versions in the file. From #4 and for 2003
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,417

    Re: Extract top 4 values and sum

    My phrasing was poor. Sorry about that. I should have said " ... yet your (the OP's) uploads are in formats newer."

  10. #10
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: Extract top 4 values and sum

    Thank you - have edited profile (has been awhile since I have been active on this site!). Will try your suggestions and report back

  11. #11
    Registered User
    Join Date
    01-16-2010
    Location
    vancouver, canada
    MS-Off Ver
    Excel for MAC 2018
    Posts
    59

    Re: Extract top 4 values and sum

    I have gone back and looked at all of these again, and I think this is one I can work with for now (from BMV) - thank you all for your patience - I was getting quite confused!!
    Thank you BMV
    I am going to have to learn more about the Control-shift-enter for entering array formulas on my MAC - could not quite master that FlameRetired...

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Extract top 4 values and sum

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  13. #13
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,455

    Re: Extract top 4 values and sum

    Just be aware that array formulas will eventually slow your sheets down...

  14. #14
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Extract top 4 values and sum

    Quote Originally Posted by Pepe Le Mokko View Post
    Just be aware that array formulas will eventually slow your sheets down...
    Can you prove it and exact for this case?
    For 50000 rows result of calculation (sec)
    0,203125 Non array
    0,171875 Array1
    0,167968 Array2
    and calc again
    0,1875 Non array
    0,171875 Array1
    0,171875 Array2

    for 200000 rows
    0.515625 Non array
    0.40625 Array1

+ 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. Formula to extract unique values/distinct values in rows in excel
    By bjnockle in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-07-2020, 05:35 PM
  2. Extract values and the use index to transpose values across columns to rows
    By bjnockle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-19-2017, 08:46 PM
  3. Replies: 11
    Last Post: 10-27-2016, 07:33 PM
  4. [SOLVED] Extract values (row values and column values) with formula
    By bjnockle in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-17-2014, 10:13 AM
  5. Macro Loop to Extract Specific Values and Min/Max Values From Column/Rows Range
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-19-2010, 09:19 AM
  6. [SOLVED] Extract Unique Values, Then Extract Again to Remove Suffixes
    By Karl Burrows in forum Excel General
    Replies: 23
    Last Post: 06-25-2005, 08:05 PM

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