my first question is: Can you simply edit an already existing
function in Excel?"
No.
=MAX(INDIRECT("B" & MATCH(DATEVALUE("August 18, 2005"),A5:A41,1)+4+1 &
":B" & MATCH(DATEVALUE("September 16, 2005")-1,A5:A41,1)+4))
a megaformula.. ugh! My first attempt, I think I'll get something
slicker next week.
Dates were in A5:A41, most recent at the bottom
Values were in B5:B41
The formula includes dates such as "September 16, 2005" but the dates
can be in any format that excel recognises as a date.
You could dump 'Datevalue(~~)' and just have cell references to dates
elsewhere on the sheet instead.
It gives the maximum flow BETWEEN (and not including) the two dates;
this was so it could handle missing dates in the column. (The '+1' and
'-1' in the formula compensate for what the Match function returns.)
The '+4' (twice) in the formula is because the data starts at row 5
(Match would return 1 if a date before the first date was entered, but
this datum is at row 5.. the difference is +4). I kept the '+4' and
'+1' separate for better understanding and easier adjustment.
Note: I later found entering a date before the first date fails - more
work there.
Any upper case letter B within quotation marks is the reference to
column B where the flow values are held.
A user defined function would probably be more robust, tidier and more
flexible. Perhaps next week...