Forum Discussion
max value if criteria match
- 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
mtarler Could I please ask you for another favor?
I have attached the full data input sheet. Apart from tracking mileage, I'm looking also at regularly measuring any reserve left in the fuel tank. Each driver should keep 40 litres of fuel in the tank at all times and this is measured by dipping a level stick into the calibrated tank. Every time a truck goes out, the stick is dipped and we take a record of the level. Would be great if you could help me with a similar formula to match the fleet number with a previous trip and calculating the "float" variance for that particular trip.
The columns for float and any variance are H and I in the attached file...
Many Thanks
Vito
=VLOOKUP(B2,B3:H$99999,5,FALSE)
- vitoaiacoJul 28, 2021Brass ContributorYes, but this time I would like to calculate the + or - variance of the two readings. I've tried the following but it doesn't seem to work:
=VLOOKUP(D2,D3:H$99999,5,FALSE)-H5- mtarlerJul 28, 2021Silver ContributorIt should work but your refs are a little scrambled (i just opened the sheet and saw some things shifted). Try:
=VLOOKUP(D5,D6:H$99999,5,FALSE)-H5