View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Finding max value within a subgroup

Here's what I'm looking at:

I've got a data set which pairs a customer with the dates that customer
has ordered, looking like this:

Customer # Order date
1 3/5/06
1 4/12/06
1 5/19/06
2 1/3/06
2 4/5/06
3 2/12/06
3 3/19/06
3 5/22/06

And so forth. Its a very long list.
I need to write a function with the customer number as an input (the
subgroup) which finds the most recent order date (the max) and returns
that date, so the output would look like this:

Customer # Most Recent Order
1 5/19/06
2 4/5/06
3 5/22/06

Thanks in advance for your help,

JC