Oldest date for Duplicate Cust. #

M

MathewS

I'm trying to get the oldest date associated with a
customer number, and in the Cust# column, i'll have many
duplications of the same customer number.
Let's say A is "Date", and B is "Cust#".
(I won't be able to allow my users to sort the data, so
i'll need a formula that returns either the oldest date,
or the cell which contains the oldest date.)

Any help is much appreciated!
 
A

Andre Croteau

Hi Matthew,

Suppose you have data in cells A8:B24, Whereby column A has "Customer #"
and column B has "dates"
and you are inputing a Customer # in cell B1:

In Cell C1 you can use this array formula to give the oldest date:

=MAX(($A$8:$A$24=$B$1)*($B$8:$B$24)) entered with Shift-Control ENTER


In cell D1 , you can use this array formula to give the LOCATION (row
number) of the oldest date:

=MAX(ROW(8:24)*(IF(($B$8:$B$24*($A$8:$A$24=$B$1))=MAX(($A$8:$A$24=$B$1)*($B$
8:$B$24)),1,0))) entered with Shift-Control ENTER


Hope this helps

André
 

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