+ Reply to Thread
Results 1 to 2 of 2

I succeeded but am guessing there's a better way. max-index-match-unique vlaues

  1. #1
    Forum Contributor
    Join Date
    11-26-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    116

    I succeeded but am guessing there's a better way. max-index-match-unique vlaues

    Hi everyone! I just managed to perform the operation I needed to do but with so many steps I feel ashamed! I'm sure there was an easier, straighter way of performing that so just for personal improvement, here's the challenge:

    Source table:
    Lot# Sequence Value
    ABC01 1 15
    ABC01 2 10
    ABC01 3 14
    ABC01 4 7
    ABC01 5 12
    ABC01 6 14
    ABC02 1 2
    ABC02 2 10
    ABC02 3 8


    Desired output:
    ABC01 - 14
    ABC02 - 8
    ABC01 - 14

    So for each Lot#, I need to find the Value that corresponds to the highest Sequence number.

    What I did:

    1. Filter Lot# with unique values only on new column
    2. Next to that new column, extract max Sequence with this simple array formula: =MAX(IF(F$2:F$757=H2;B$2:B$3751))
    3. Next to that new new column, extract Value that corresponds to 2 criteria: lot# and max Sequence with this array formula: =INDEX(D$2:D$3751;MATCH(1;(H2=F$2:F$3751)*(I2=B$2:B$3751);0))
    4. On my data sheet where I have my lot # and where I need to find the corresponding Values, I have yet another formula (not arrayed tho):
    =IFERROR(INDEX('sheet1'!J$2:J$757;MATCH(M3;'sheet1'!H$2:H$757;0));"Lot# not found")

    Voilą !

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

    Re: I succeeded but am guessing there's a better way. max-index-match-unique vlaues

    Hi,

    if sequences are in ascending order


    =LOOKUP(2,1/(A$1:A$1000="ABC01"),C$1:C$1000)

    Hope it helps
    -----------------------------------------------------

    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.

+ 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. Index match to find unique values
    By BobTheRocker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2014, 02:17 AM
  2. Replies: 7
    Last Post: 06-27-2014, 02:26 AM
  3. Index and Match Unique values from list
    By thelegazy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-03-2013, 02:49 AM
  4. Index and Match 2 criteria 1 unique value
    By kosmonautas in forum Excel General
    Replies: 2
    Last Post: 05-17-2012, 03:16 AM
  5. Replies: 7
    Last Post: 03-26-2009, 12:13 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