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:

00300000002ayxtAAAiPhone619/01/2015
00300000002ayxtAAAiPhone506/12/2012
00300000002ayxtAAAiPhone528/05/2014
00300000002ayxtAAAiPhone7 Plus16/01/2017
00300000002bnjJAAQiPhone7 Plus23/05/2017
00300000002bnjJAAQiPhone524/05/2013
00300000002bnjJAAQiPhone611/07/2015
00300000002cuh1AAAiPhone526/08/2014
00300000002cuh1AAAiPhone4s20/08/2014
00300000002d5NiAAIiPhone7 Plus22/02/2017
00300000002d5NiAAIiPhone7 Plus01/05/2017

<tbody>
</tbody>
And here is an example of the output I would like to return:

00300000002ayxtAAAiPhone619/01/2015
00300000002ayxtAAAiPhone506/12/2012
00300000002ayxtAAAiPhone528/05/2014
00300000002ayxtAAAiPhone7 Plus16/01/2017 iPhone7 Plus
00300000002bnjJAAQiPhone7 Plus23/05/2017 iPhone7 Plus
00300000002bnjJAAQiPhone524/05/2013
00300000002bnjJAAQiPhone611/07/2015

<tbody>
</tbody>

Thanks
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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,215,331
Messages
6,124,311
Members
449,152
Latest member
PressEscape

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