Looking up a maximum value that matches criteria. VLOOKUP?

A

AndyCotgreave

Hi,
I'm trying to do a VLOOKUP, but I need the maximum value of a
particular column. For example, in the data below:

Col A Col B Col C
Name Start End
Andy 01 January 1997 03 February 2005
Belinda 02 April 1996 08 January 2000
Charlie 03 February 2001 10 October 2002
Andy 01 January 1997 01 March 2004

In column D I want the maximum End date for each person. So, for the
above:
Col A ...Col D
Name End
Andy 03 February 2005
Belinda 08 January 2000
Charlie 10 October 2002
Andy 03 February 2005

I'm sure the answer lies in VLOOKUP, or maybe it's INDEX/MATCHES?

Thanks in advance
 
G

Guest

one way to do this is

sort the entire list on fist name asced and then data descnd
then in a different range enter the names
and now use match, index and offset to get the maximum date

HTH,
 
M

Max

One way ..

Put in D2 and array-enter the formula by pressing CTRL+SHIFT+ENTER:
=INDEX(C$2:C$100,MATCH(MAX(IF(A$2:A$100=A2,C$2:C$100)),IF(A$2:A$100=A2,C$2:C$100),0))
Copy D2 down. Adapt the ranges to suit
 
A

AndyCotgreave

Put in D2 and array-enter the formula by pressing CTRL+SHIFT+ENTER:
=INDEX(C$2:C$100,MATCH(MAX(IF(A$2:A$100=A2,C$2:C$100)),IF(A$2:A$100=A2,C$2:­C$100),0))
Copy D2 down. Adapt the ranges to suit
--

Brilliant!
I've never managed to get my head round that level of complexity in a
formula. I can understand each individual bit, but struggle to write
that kind of thing myself.
Thanks
Andy
 
M

Max

welcome, Andy.

---
:

Brilliant!
I've never managed to get my head round that level of complexity in a
formula. I can understand each individual bit, but struggle to write
that kind of thing myself.
Thanks
Andy
 

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