Hi again

I spoke too soon

Martin Wilson suggested the following:-

hm it had problems but this is better
=IF(OR(AND(A2>=VALUE("12:00:00"),B2<VALUE("12:40:00")),AND(A2>=VALUE("16:00:00"),B2<VALUE("16:40:00"))),(A2-MOD(A2, 40/24/60)),(A2-MOD(A2,30/24/60)))

The 40 and the 30 need reversing but I have tried this on a full set of data and......................

The formula is producing 30 minute time buckets at times other than 12:00 - 12:39 and 16:00 thru 16:39

How odd?

So still not what I am seeking

Bob M