.. What I need to do is find the 10-mile stretch of
road with the most accidents
Extending the earlier construct ...
Put in F1: =IF(E1="","",E1-ROW()/10^10)
Put in G1:
=INDEX(C:C,MATCH(LARGE(F:F,ROW()),F:F,0))&"-"&
INDEX(C:C,MATCH(LARGE(F:F,ROW()),F:F,0))+9
Put in H1: =INDEX(E:E,MATCH(LARGE(F:F,ROW()),F:F,0))
Select F1:H1, fill down
Col F is an arbitrary tie-breaker col for col E
(there's bound to be a lot of ties in the figures in col E)
Col G returns the full descending sort of "10-mile stretches" by total
accidents
Col H returns the total accidents for the "10-mile stretches" listed in col
G
Tied "10 mile stretches", if any, would appear
in the same relative (sequential) order that they are listed in col C
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---