Forum Discussion
vitoaiaco
Jul 28, 2021Brass Contributor
max value if criteria match
Dear all, I hope you can help me with this. I am trying to generate a spreadsheet that can keep track of fuel consumption. The one responsible for this will enter the information related to mileage...
- Jul 28, 2021
vitoaiaco sry but just notice you said Excel 2007 so use this:
=VLOOKUP(B2,B3:C$99999,2,FALSE)it does result in #N/A when not found but that is appropriate is it is Not Available yet
SergeiBaklan
Jul 28, 2021Diamond Contributor
As variant
=INDEX($C$2:$C$1000,AGGREGATE(14,6,1/($B$2:$B$1000=$B2)*(ROW($B$2:$B$1000)-ROW($B$1)),1))
gives
- vitoaiacoJul 28, 2021Brass Contributor
Thank you both so much, it worked.
Really appreciate your quick responses.
Vito