Does anyone know of a formula to calculate the min or max of a range subject to a condition, akin to the SumIf and CountIf funtions? I've tried array formulae, but as far as I've been able to tell, the condition must be a constant, not a cell reference. My particular situation, which I would guess is common enough, is a row or column of monthly data for multiple years; for each year, I'd like to find the largest or smallest value.
I've written a VBA function to perform the maxif function, but I can't use it in every situation.
Eric



