Here's a somewhat more general answer:
Suppose you want to compute the MAXes (or MINs, or MEDIANs, etc.) of numeric values appearing in cols C & D for the contiguous subset of rows i to j in an array extending from rows 6 to N, with the value of "row" entered in col B. Let the explicit value of i be specified in B2 and that of j in B3 (--those values perhaps having been computed elsewhere in your spreadsheet, a priori); here, for sake of transparency, let i = 9 and j = 14, with n = 15.
Here's the Excel2003 code I've developed, which seems to work just fine:
which returns MAX(C9:C14) ; and,
which returns MAX(D9:D14) .
Just change MAX to MIN or other function name, to do analogous computation. But, don't forget to re-install (Ctrl-Shift-Enter) those "curly brackets," which will go away everytime you manipulate the statement.