Identifying most recent date and returning a value

ROSE217

New Member
Joined
Jun 27, 2017
Messages
6
Hi,

I have a large spreadsheet wherein I want to identify a users most recent device, to do this I need to find the most recent date and then return the value associated with that date and the user. I tried using =VLOOKUP(MAX(A2:A9),A2:C9,3,0), but it just returned the overall recent date not specific to each user. Here is an extract of the spreadsheet:

[TABLE="width: 506"]
<tbody>[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone6[/TD]
[TD="align: right"]19/01/2015[/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]06/12/2012[/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]28/05/2014[/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]16/01/2017[/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]23/05/2017[/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]24/05/2013[/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone6[/TD]
[TD="align: right"]11/07/2015[/TD]
[/TR]
[TR]
[TD]00300000002cuh1AAA[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]26/08/2014[/TD]
[/TR]
[TR]
[TD]00300000002cuh1AAA[/TD]
[TD]iPhone4s[/TD]
[TD="align: right"]20/08/2014[/TD]
[/TR]
[TR]
[TD]00300000002d5NiAAI[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]22/02/2017[/TD]
[/TR]
[TR]
[TD]00300000002d5NiAAI[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]01/05/2017[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
And here is an example of the output I would like to return:

[TABLE="width: 620"]
<tbody>[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone6[/TD]
[TD="align: right"]19/01/2015[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]06/12/2012[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]28/05/2014[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00300000002ayxtAAA[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]16/01/2017[/TD]
[TD] iPhone7 Plus[/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone7 Plus[/TD]
[TD="align: right"]23/05/2017[/TD]
[TD] iPhone7 Plus[/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone5[/TD]
[TD="align: right"]24/05/2013[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]00300000002bnjJAAQ[/TD]
[TD]iPhone6[/TD]
[TD="align: right"]11/07/2015[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You can use an array to find the max of each user code.


Excel 2010
ABCD
1UserDeviceDate
200300000002ayxtAAAiPhone61/19/2015 
300300000002ayxtAAAiPhone512/6/2012
400300000002ayxtAAAiPhone55/28/2014
500300000002ayxtAAAiPhone7 Plus1/16/2017iPhone7 Plus
600300000002bnjJAAQiPhone7 Plus5/23/2017
700300000002bnjJAAQiPhone55/24/2017iPhone5
800300000002bnjJAAQiPhone67/11/2015
900300000002cuh1AAAiPhone58/26/2014iPhone5
1000300000002cuh1AAAiPhone4s8/20/2014
1100300000002d5NiAAIiPhone7 Plus2/22/2017
1200300000002d5NiAAIiPhone7 Plus5/1/2017iPhone7 Plus
Sheet1
Cell Formulas
RangeFormula
D2{=IF(C2=MAX(IF(A:A=A2,C:C)),B2,"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


Note: my example uses the US version of the dates, but should still work for your locale.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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