Vlookup return most recent date (value)

R

ryanholliday

Hello,

I have a set of data where Column A contains an personal ID# (001). Column
B contains a timestamp. My table has multiple entries for each ID# and
different timestamps for each entry. I want to use a vlookup to find the
MOST RECENT timestamp for EACH ID. Any help would be greatly appreciated.

Thanks,
Ryan
 
J

Jacob Skaria

With your data in ColA/B and the query ID in cell C1 try the below

=SUMPRODUCT(MAX(($A$2:$A$100=C1)*$B$2:$B$100))
 
D

Don Guillett

This is an ARRAY formula that must be entered/edited using ctrl+shift+enter

=MIN(IF(a6:a66="a",B6:B66))
 
B

Bernard Liengme

Starting in D1 I have a column of unique IDs - made with Advanced Filter
In E1 I used this array formula =MAX(IF(A:A=D1,B:B))
(Array formula - so complete it with CTR+SHIFT+ENTER not just ENTER)
You will need to format the cell as Date otherwise it will display the
5-digit serial number of the date
Copy down the column
If you use ranges, make use you use absolute references as in
=MAX(IF($A$1:$A$100=D1,$B$100:$B1$100))
best wishes
 
J

Jim Thomlinson

I could not get that to work... In it's current form it just returned zero. I
tried

=SUMPRODUCT(MAX(--($A$2:$A$100=C1), $B$2:$B$100))

But that just returned the max date regardless of the ID selected. Here is
what I ended up with...

=MAX(IF($A$2:$A$100=C1, $B$2:$B$100))

***Note this is an array formula and MUST be committed using
Shift + Ctrl + <Enter>
 
J

Jacob Skaria

Jim, could you please try again..with the alternate query IDs in cell c1...

Col A Col B Col C
1 7:21 PM 3
1 7:22 PM
2 8:05 PM
2 8:06 PM
3 9:06 PM
3 9:07 PM
 
J

Jacob Skaria

OK. I remember a similar response from you few months back while I used
SUMPRODUCT() MAX() combination; but I found that too late to respond...It
works when the criteria (here ColA) is both text and numerics...Thanks Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top