View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Maximum value within a time range

Suppose you put your start date of the period of interest in D1 and
the end date in E1 (as Excel will not understand "the first trimester
of 2008"), then you can use this array* formula, say in F1:

=MAX(IF((A1:A1000=D1)*(A1:A1000<=E1),B1:B1000))

I've assumed 1000 rows - adjust as required.

*An array formula needs to be committed using the key combination of
Ctrl-Shift-Enter (CSE) instead of the usual <enter. If you do this
correctly then Excel will wrap curly braces around the formula when
viewed in the formula bar - do not type these yourself. If you need to
edit the formula, then you will need to use CSE again.

Hope this helps.

Pete

On Sep 2, 11:15*pm, "Somnifer" wrote:
Hi,

I have a worksheet with two columns, the first (A) contains a large number
of dates and the second (B) a value corresponding to that date.

What I want to do is pick out the maximum value of column B within a certain
time range (say, only the first trimester of 2008).

All help would be greatly appreciated...

Somnifer