Find Oldest date based on two criteria.

L

Lester Mosley

I am having an issue trying to figure out this issue.. I have tried a
MIN, but it doesnt seem to work correctly..

I have three columns One with a State, one with a Code and one with a
date.

The Code can have say EA12 EA23 EA45 and FG12 FG34 FG56

What I need to have happen is that when State= NY and CODE Starts with
EA find me the oldest date in the column.

Example

A B C
NY EA12 1/1/2009
NY EA24 2/28/2009
CT EA12 3/2/2009
NY FG34 4/5/2009
ME FG45 5/1/2009
NY EA12 12/31/2008

What I need is it to give me the date 12/31/2008 When A=NY B=EA*
The row about will be near max of excel around 50000-60000
Any help is greatly appreciated.
 
T

T. Valko

Try this array formula** :

E2 = NY
F2 = EA

=MIN(IF((A2:A7=E2)*(LEFT(B2:B7,2)=F2),C2:C7))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Format the cell as Date
 

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