Yuri
Glad its sorted, but for reference:
DMAX
If you have several years and you need the months for each year:
1) Add a column for each (entitled Month and Year, using the respective functions to calculate the value). I will assume these are in columns A to C
2) Add a criteria table of years and month (both ascending) in columns E & F entitled Year and Month (as per the main table), i.e.
Year Month
2006 11
2006 12
2007 1
etc
3) Next to the criteria table (say) enter the functions to G1 and below:
=DMAX($A$1:$C$n,1,$E$1:$F2)
where n is the last row in your source table.