Lookup Column, Return Max Value and Date Value

Karl_Hungus_53

New Member
Joined
Apr 10, 2017
Messages
1
I have a table with mileage history to various company vehicles that looks like this:

Truck #1234567891011121314151617181920
Date
4/7/2017275,686266,965219,614159,600134,764141,345158,15256,33372,25461,39352,86647,684342,68021,032
3/31/2017266,500219,438159,300140,830137,66756,28771,97252,50647,10120,598
3/24/2017 275,686 265,900219,152158,700134,551140,625137,179 71,687 52,14646,410 20,244

<colgroup><col><col span="21"></colgroup><tbody>
</tbody>

Each truck then has it's own tab where I have maintenance history. On each of those tabs is a cell for the most recent mileage reading and a cell with the date of that reading. I would like to create a formula for the Mileage cell to lookup the truck number and return the highest mileage reading and in the Date cell, return the date of that reading.

Example: on the tab for truck number 6, the Mileage cell should read 266,965 and the Date cell should read 4/7/2017.

I figured out the mileage issue using this formula: {=MAX(IF(1:1="Desired Truck Number", 3:5))}, but I can't get the date problem solved. Any ideas? Also, is there a better way to find the mileage?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
1. In A10 just enter:

=MAX(INDEX($B$3:$U$5,0,6))

2. In A11 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($A$3:$A$5,SMALL(IF(INDEX($B$3:$U$5,0,6)=$A$10,ROW($A$3:$A$5)-ROW($A$3)+1),ROWS($A$11:A11))),"")

You can have 6 in say $A$9 and refer to it in the formulas.
 
Upvote 0

Forum statistics

Threads
1,214,413
Messages
6,119,374
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top