+ Reply to Thread
Results 1 to 13 of 13

Excel 2003, returning 2 largest values

  1. #1
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7

    Excel 2003, returning 2 largest values

    hi,
    I am looking to create a formula to add together the two highest values of a list of 10 numbers.
    I know you can use something like large(a1,a10,1)+large(a1,a10,2) if numbers are in an array but my problem is numbers arent
    they are in random positions along a row....

    can anyone helps?

    thanks in advance

    Dave

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    Provided that all the numbers are in the same row, and there's no other numbers in that row,

    =SUM(LARGE(1:1,1),LARGE(1:1,2))

    will add the two highest numbers together (row 1 used in the example)

    HTH

    Dave
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you name the range of the random cells, then the Large() function should work...

    Select each cell while holding down the CTRL key... then go to Insert|Name|Define and name that range something like Array1.

    Then formula is: =Large(Array1,1)+Large(Array1,2)
    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.

  4. #4
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    thanks for your replies,

    Sweep- unfortunately I do have other numbers in the row

    NVBC- thanks, i was simplifying problem down to one row, but actually want to then copy the formula for other row so naming the array wont work

  5. #5
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    You say the numbers you want to examine are in random positions. How do you know which ones meet the criteria of being included in the evaluation? We can compose a 'Sum The Two Largest Values Based On Conditions' formula for you if that is what you need? A simple worksheet example would also help...

    Colin

  6. #6
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    thanks for interest guys, sorry didnt really explain well, when i meant random just meant they are not every other cell or every third

    I've attached an example, lets say Im trying to find the sum of the top two numbers in columns with vowel headings

    in my project the columns are such so that I cant cut and copy them next to each other like i could in this simple example


    thanks

    dave
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    I should say, the numbers are not randomly generated in the actual workbook, in case that would change solution

    just couldnt be bothered making them up lol

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Excel 2003, returning 2 largest values

    Using your posted workbook

    Try this:
    Please Login or Register  to view this content.
    Copy that formula down through B6

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  9. #9
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    hi thanks for effort ron, but that just picks the highest from the entire row, I'm wanting the two highest from (in this case) only the columns with a vowel at the top

    I tried trying to use =sum(large(c3,e3,g3,h3,k3,{1,2}))

    but it wont have that
    Last edited by davros80; 08-27-2008 at 11:05 AM. Reason: missed bracket

  10. #10
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    In cell B3 try something like:

    =SUMPRODUCT(LARGE(($C$2:$L$2={"A";"E";"I";"O";"U"})*($C3:$L3),{1,2}))

    Copy formula down the B column.

    Colin
    Last edited by Colin Legg; 08-27-2008 at 11:13 AM.

  11. #11
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    thanks colin for that, altho I think I might have got it now

    ron thanks for your formula, used that and the one it wouldnt take before, put some more brackets in, it seems to work
    =SUM(LARGE((C4,E4,G4,H4,K4),{1,2}))
    it seems to let me use large over a non contiguous range then

  12. #12
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Sure no problem.

    Provided you don't have too many columns and the column headers never change then that will be fine. Glad you found a solution.

    Colin

  13. #13
    Registered User
    Join Date
    08-27-2008
    Location
    UK
    Posts
    7
    thanks for all your help guys,


    admin: feel free to lock this now

+ 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. Inserting linked images into Excel 2003 worksheet
    By ferrell in forum Excel General
    Replies: 1
    Last Post: 04-19-2007, 09:29 PM
  2. What can Excel 2003 do that Excel 97 cant?
    By DKerr in forum Excel General
    Replies: 1
    Last Post: 11-02-2006, 07:11 AM
  3. Conditionally sum largest N values
    By LoanWolf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2006, 05:03 PM
  4. Excel Worksheet not Fetching values
    By vinidimple in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2006, 03:13 AM
  5. Excel Align equal values in adjoining Columns
    By egan-23 in forum Excel General
    Replies: 2
    Last Post: 09-13-2006, 12:28 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