Please help me with this function? I am struggling..
Gina,
I'm not sure why you use the leading COUNTIF fucntion - it actually throws things off if the dates
are out of order. This seems better - array entered:
=IF(MAX(IF(($G$2:$G$2500=G2)*($D$2:$D$2500<D2),$D$ 2:$D$2500))0,D2-MAX(IF(($G$2:$G$2500=G2)*($D$2:$D$2500<D2),$D$2:$D $2500)),"")
This also takes care of the error produced when the date in D is the earliest date for that
district.
HTH,
Bernie
MS Excel MVP
"Gina" wrote in message
...
That last question was my mistake- I'm sorry. Your formula is working
perfectly.
|