View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default index-match and another condition

Try these array formulas** :

For a specific year:

=INDEX(E1:E7,MATCH(LARGE(IF(B1:B7=yn,F1:F7),1),F1: F7,0))

For a specific month:

=INDEX(E1:E7,MATCH(LARGE(IF(C1:C7=mn,F1:F7),1),F1: F7,0))

For a specific month and year:

=INDEX(E1:E7,MATCH(LARGE(IF((B1:B7=yn)*(C1:C7=mn), F1:F7),1),F1:F7,0))

Whe yn = year number, mn = month number

Format as DATE

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"need a help" wrote in message
...
a b c d e
f e
1 2007 5 18 18/5/2007 35 a
2 2007 6 21 21/6/2007 38 b
3 2007 6 22 22/6/2007 34.75 c
4 2008 6 23 23/6/2008 35 d
5 2008 5 24 24/5/2008 33 e
6 2008 6 25 25/6/2008 36 f
7 2008 6 28 28/6/2008 36.5 h
i am using this one
=INDEX($E$1:$E$7,MATCH(LARGE($F$1:$F$7,1),$F$1:$F$ 7,FALSE)) the result
will
be = 21/6/2007
=INDEX($F$1:$F$7,MATCH(LARGE($F$1:$F$7,1),$F$1:$F$ 7,FALSE))
the result will be = 38
but when i need to know the largest in 2007 i mean by column (B) or by
month
by column (C) or by both (B)&(C) year and month i have tried many way but
i
didn't get it , so any nice programmer tell me how i can do that and many
thanks for him in advace