
Originally Posted by
JBeaucaire
In L7 enter this horrible ugly array formula:
=INDEX($B$1:$B$28, SUMPRODUCT(--(($C$6:$I$28-$L$4)=MIN(IF($C$6:$I$28>=$L$4,ABS($C$6:$I$28-$L$4),"")))*ROW($C$6:$I$28))) & """ Pipe"
& ", Schedule " & INDEX($A$5:$I$5, SUMPRODUCT(--(($C$6:$I$28-$L$4)=MIN(IF($C$6:$I$28>=$L$4, ABS($C$6:$I$28-$L$4), "")))*COLUMN($C$6:$I$28)))
...Confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You'll know the array is active when the curly braces { } appear around your formula.
It's formulas like that that make me want to resort to VBA. Wouldn't it be awesome to be able use a custom formula like:
=BestPipe(L4, C5:I28)
....and get the same answer. Anyway, that works.
Bookmarks