SOLVED
Home

Vlookup - highest value

%3CLINGO-SUB%20id%3D%22lingo-sub-326556%22%20slang%3D%22en-US%22%3EVlookup%20-%20highest%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326556%22%20slang%3D%22en-US%22%3E%3CP%3EHigh%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20table%20with%203%20columns%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20text%20based%20column%20with%20a%20unique%20code%2C%20a%20product%20name%20column%20and%20a%20column%20with%20amounts.%3C%2FP%3E%3CP%3EThe%20thing%20is%20that%20I%20have%20to%20search%20into%20this%20table%20on%20product%20name%2C%20select%20the%20row%20with%20the%20highest%20unique%20code.%20Then%20the%20formula%20has%20to%20return%20the%20amount%20of%20products%20of%20that%20specific%20row.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttached%20you%20can%20find%20the%20excel%20with%20the%203%20columns.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3ESo%20we%20do%20a%20%22vlookup%22%20for%20product%20F.%3C%2FP%3E%3CP%3EThere%20are%203%20rows%20with%20PRODUCT%20F%3A%2061.281%2C%2061.281-1%20and%2061.281-2%3C%2FP%3E%3CP%3EThe%20formula%20should%20return%2033.846%20because%20this%20is%20in%20row%2061.281-2%20which%20has%20clearly%20the%20highest%20value.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EDennis%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-326556%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-326689%22%20slang%3D%22en-US%22%3ERe%3A%20Vlookup%20-%20highest%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326689%22%20slang%3D%22en-US%22%3EThanks%20Haytham%2C...%20this%20works%20like%20a%20charm!!!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-326664%22%20slang%3D%22en-US%22%3ERe%3A%20Vlookup%20-%20highest%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-326664%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Dennis%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20try%20this%20formula%3A%3C%2FP%3E%3CPRE%3E%3DINDEX(%24C%241%3A%24C%2424%2CMATCH(MAX(IF(F6%3D%24B%241%3A%24B%2424%2CSUBSTITUTE(%24A%241%3A%24A%2424%2C%22-%22%2C%22%22)%2B0))%2CSUBSTITUTE(%24A%241%3A%24A%2424%2C%22-%22%2C%22%22)%2B0%2C0))%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71193i5E3DC62A9C2DAD30%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Return%20the%20highest%20value.png%22%20title%3D%22Return%20the%20highest%20value.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20note%20that%20you%20have%20to%20press%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FGuidelines-and-examples-of-array-formulas-7D94A64E-3FF3-4686-9372-ECFD5CAA57C7%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3ECtrl%2BShift%2BEnter%3C%2FSTRONG%3E%3C%2FA%3E%20each%20time%20you%20enter%20this%20formula%2C%20and%20after%20you%20open%20it%20in%20the%20edit%20mode.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E
Dennis Depoorter
Occasional Contributor

High all,

 

I have a table with 3 columns:

 

A text based column with a unique code, a product name column and a column with amounts.

The thing is that I have to search into this table on product name, select the row with the highest unique code. Then the formula has to return the amount of products of that specific row.

 

Attached you can find the excel with the 3 columns.

 

Example:

So we do a "vlookup" for product F.

There are 3 rows with PRODUCT F: 61.281, 61.281-1 and 61.281-2

The formula should return 33.846 because this is in row 61.281-2 which has clearly the highest value.

 

Thanks,

Dennis

 
 
2 Replies
Solution

Hi Dennis,

 

Please try this formula:

=INDEX($C$1:$C$24,MATCH(MAX(IF(F6=$B$1:$B$24,SUBSTITUTE($A$1:$A$24,"-","")+0)),SUBSTITUTE($A$1:$A$24,"-","")+0,0))

Return the highest value.png

 

Please note that you have to press Ctrl+Shift+Enter each time you enter this formula, and after you open it in the edit mode.

 

Hope that helps

Regards

Thanks Haytham,... this works like a charm!!!