Zend certified PHP/Magento developer

Max value from multiple criteria with VLOOKUP

I want to find and display the highest number based on a grouping. Column A has a group of names with an item number at the end. Column C has individual item names and Column D has a number associated with that item name. The VLOOKUP I currently have searches the grouping to return the number associated with that item. What I want to do is search all the items in the grouping and return the highest value from Column D. Formula I’m using now =VLOOKUP(MID(A2,1,FIND(“-“,A2,1)-1),C2:D41,2,FALSE)

enter image description here

Any help would be very appreciated.