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ą !
Bookmarks