Re: Selection by Date and Time

I'm a little confused about what you're asking here.

I understand that you want to look at the first three time values, and then compare them to each other to determine which values among the three are the closest--right?

In the example you gave, the first two values are closer than the second and third values.

But where do we go from there? Are we then comparing the second, third, and fourth values, as the first choice might be inclusive to itself?

Or should we be comparing the third, fourth and fifth values, since we've already used the first and second data values?

Still, perhaps we should be examining the fourth, fifth, and sixth values, since we've already done a comparison with the first three values?

If we're simply comparing every three rows, you could put a formula in every three rows. Say Cell A1 is the label "TM", Cell B1 is "B", and Cell C1 is "A"--and then you'd have your data immediately beneath that (in Cells A2, B2, and C2), in Cell D2, you could put a formula like this:

**=IF(A4-A3>A3-A2,"T1 and T2","T2 and T3")**

That would then compare three values at once. But I'm really not sure where to go next?

What if the first and third values were closest, what to do with the second value? Do we then compare it to the fourth and fifth values?

Also, do you disregard the end-product if there are only two rows of data left?

What about one row at the end?

Does T1, T2, T3, etc. always refer to values down the list (i.e., the fourth row down is T4)?

What if the time-values become the same, or would that never occur?