Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sam
 
Posts: n/a
Default Max Lookup formula

Hi All

In column A I have an ID number which can repeat a number of times. In
column B I have Dates eg:

A B
xyz 02/05/2005
xyz 20/05/2005
xyz 25/05/2005
abc 03/05/2005
abc 05/05/2005
abc 01/05/2005

The data is not sorted by date.

In another range, say column G, I have a unique list of IDs eg:

G
xyz
abc

I would like to enter a formula in column H to give me the maximum date
for each ID so my result would be

G H
xyz 25/05/2005
abc 05/05/2005

Many thanks
Sam
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

One way:

=MAX(IF(A1:A100=G1,B1:B100))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Extend the range, but don't use the whole column.

And format the cell with the formula as a date.



sam wrote:

Hi All

In column A I have an ID number which can repeat a number of times. In
column B I have Dates eg:

A B
xyz 02/05/2005
xyz 20/05/2005
xyz 25/05/2005
abc 03/05/2005
abc 05/05/2005
abc 01/05/2005

The data is not sorted by date.

In another range, say column G, I have a unique list of IDs eg:

G
xyz
abc

I would like to enter a formula in column H to give me the maximum date
for each ID so my result would be

G H
xyz 25/05/2005
abc 05/05/2005

Many thanks
Sam


--

Dave Peterson
  #3   Report Post  
RagDyer
 
Posts: n/a
Default

Try this in H1:

=SUMPRODUCT(MAX(($A$1:$A$10=G1)*($B$1:$B$10)))

And copy down.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"sam" wrote in message
...
Hi All

In column A I have an ID number which can repeat a number of times. In
column B I have Dates eg:

A B
xyz 02/05/2005
xyz 20/05/2005
xyz 25/05/2005
abc 03/05/2005
abc 05/05/2005
abc 01/05/2005

The data is not sorted by date.

In another range, say column G, I have a unique list of IDs eg:

G
xyz
abc

I would like to enter a formula in column H to give me the maximum date
for each ID so my result would be

G H
xyz 25/05/2005
abc 05/05/2005

Many thanks
Sam


  #4   Report Post  
sam
 
Posts: n/a
Default

Excellent. Thank you Dave.

Dave Peterson wrote:
One way:

=MAX(IF(A1:A100=G1,B1:B100))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Extend the range, but don't use the whole column.

And format the cell with the formula as a date.



sam wrote:

Hi All

In column A I have an ID number which can repeat a number of times. In
column B I have Dates eg:

A B
xyz 02/05/2005
xyz 20/05/2005
xyz 25/05/2005
abc 03/05/2005
abc 05/05/2005
abc 01/05/2005

The data is not sorted by date.

In another range, say column G, I have a unique list of IDs eg:

G
xyz
abc

I would like to enter a formula in column H to give me the maximum date
for each ID so my result would be

G H
xyz 25/05/2005
abc 05/05/2005

Many thanks
Sam



  #5   Report Post  
sam
 
Posts: n/a
Default

Thank you. Gotto love that SUMPRODUCT.

RagDyer wrote:
Try this in H1:

=SUMPRODUCT(MAX(($A$1:$A$10=G1)*($B$1:$B$10)))

And copy down.



  #6   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Unnecessary, probably inefficient too.

sam wrote:
Thank you. Gotto love that SUMPRODUCT.

RagDyer wrote:

Try this in H1:

=SUMPRODUCT(MAX(($A$1:$A$10=G1)*($B$1:$B$10)))

And copy down.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup Function help marlea Excel Discussion (Misc queries) 2 August 23rd 05 07:30 PM
formula to lookup table in another Worksheet please Steved Excel Worksheet Functions 1 June 14th 05 10:39 AM
Lookup formula Esrei Excel Discussion (Misc queries) 1 April 1st 05 02:36 PM
Can't find the right lookup formula for this bankscl Excel Worksheet Functions 4 March 28th 05 06:27 PM
Formula Question... LookUP G Excel Discussion (Misc queries) 4 March 7th 05 01:38 AM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"