I have two columns Item and ID - refer to the Sample Table. I need a formula in Excel to determine the longest (based on simple length of ID) per item.
Here is what I am trying to extract from the sample table:
Item 1 ABCDABC
Item 2 XXXYZ
I tried index match combination:
=INDEX("ID column",MATCH(MAX(LEN("ID column")),LEN("ID column"),0),MATCH("Item 1" , "Item Column",0))
with ctrl+shift+enter
here are the results:
Item 1 ABCDABC
Item 2 #REF!
Any help will be greatly appreciated.
Sample Table
Item ID
Item 1 ABC
Item 1 ABCD
Item 1 ABCDA
Item 1 ABCDAB
Item 1 ABCDABC
Item 2 X
Item 2 XX
Item 2 XXX
Item 2 XXXY
Item 2 XXXYZ