return next higher value from unsorted array

pkh

New Member
Joined
Nov 23, 2011
Messages
21
Hi,

I have a matrix of time values which are not sorted. I need a formula to return the next higher value than a specified value from the matrix. For example, from the times in the column below, I want to know what is the next train in station X after the 04:31:29 train. I should get the answer 05:34:34 (The zero values means train B, F and G does not stop at StnX).

Stn X
A05:34:34
B00:00:00
C11:20:03
D04:31:29
E15:49:34
F00:00:00
G00:00:00

<tbody>
</tbody>

I have tried using the index match formula, using -1 as the match type but i get the same value 04:31:29 and not next higher value. Any help much appreciated.

Pankaj
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,214,927
Messages
6,122,309
Members
449,080
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top