So this is where ordering is important - it is slightly awkward, since I think most (if not all VIC elevation band files use ordering from low to high). May be easier to enforce low to high and just start the search at the other end.