+ Reply to Thread
Results 1 to 6 of 6

Formula to return the highest number in a column based on a matching second column

  1. #1
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Formula to return the highest number in a column based on a matching second column

    In the attached file I want a formula in the highlighted cell that will return the maximum from the Reschedule column based on the match in the Tracking Ref#.

    This needs to work no matter the sort applied to the table.
    Attached Files Attached Files

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Formula to return the highest number in a column based on a matching second column

    Try MAXIFS:

    =MAXIFS(Table1[Reschedule '#],Table1[Tracking Ref'#],I2)
    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.

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to return the highest number in a column based on a matching second column

    Only have Excel 2013 in this instance.

  4. #4
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Formula to return the highest number in a column based on a matching second column

    Not a problem:

    =MAX(IF(Table1[Tracking Ref'#]=I2,Table1[Reschedule '#]))

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  5. #5
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Formula to return the highest number in a column based on a matching second column

    Hi ( Ciao AliGW!)

    MAX

    =AGGREGATE(14,6,Table1[Reschedule '#]/(Table1[Tracking Ref'#]=I2),1)

    Hope that helps

    MIN:

    =AGGREGATE(15,6,Table1[Reschedule '#]/(Table1[Tracking Ref'#]=I2),1)
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to return the highest number in a column based on a matching second column

    Thanks Ali.

+ 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. Replies: 5
    Last Post: 02-14-2019, 02:20 PM
  2. [SOLVED] Return row value for highest number in column
    By KimMorgan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2017, 10:54 AM
  3. Return the Title of a column if the column is the highest column with data
    By williamspage in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-22-2013, 10:05 AM
  4. Replies: 3
    Last Post: 07-03-2012, 09:09 PM
  5. Return value in a column based on conditions matching with different column
    By sanits591 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2009, 01:28 AM
  6. Replies: 2
    Last Post: 02-23-2008, 08:28 PM
  7. [SOLVED] choose the highest value in a row and return column number
    By jlburke4 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2005, 02:50 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