+ Reply to Thread
Results 1 to 7 of 7

From duplicate rows only return max value in a different column

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    MA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question From duplicate rows only return max value in a different column

    I have a spreadsheet that lists names in column A. These names do duplicate. In column M I have values of 1, 3, 5, or Failed.
    I need a formula that can lookup each name in Column A and only return the highest number in column M. (5,3,1 or Failed)

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: From duplicate rows only return max value in a different column

    Use pivot table for that.

    in the row select name

    in the values select number (and choose for max).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    MA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: From duplicate rows only return max value in a different column

    I created a pivot table and added the names (column A) as the row and made Column M as the values. That did show the results that looked to be a count instead of just the Maximum highest single value. I then changes the values to "Max", but that returns all "0"

    Did I do something wrong?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: From duplicate rows only return max value in a different column

    I that case you better, add an excel example, without confidentional information.

    Then i can take a look and show it to you.

  5. #5
    Registered User
    Join Date
    05-14-2013
    Location
    MA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Post Re: From duplicate rows only return max value in a different column

    Attached is an example. Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: From duplicate rows only return max value in a different column

    See the attached file.

    The problem was not the pivot table (and the max) => you did the things right.

    But the data was tekst.

    I changed your formula (see the yellow cells).

    Tip: I would not seek in the whole column (e.g. E:E) but determine a range (e.g. E2:E1500).
    Attached Files Attached Files

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: From duplicate rows only return max value in a different column

    Maybe this...

    Names in the range A2:A20
    Values in the range B2:B20

    List of unique names* in the range D2:D6.

    This array formula** entered in E2 and copied down:

    =IFERROR(1/(1/MAX(IF(A$2:A$20=D2,B$2:B$20))),"Failed")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    * You can easily generate the list of unique names using advanced filter:

    http://contextures.com/xladvfilter01.html#FilterUR
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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