Um...so what's the question? You've described the logic, tho I'm not too sure what you mean by "positions." Anyway since you understand it, what's stopping you from just codinf it up?
Hi Cormanaz,
Thanks for the reply. As you can see the third column is called position. Starts from 1 to some number (varies among different names - 1st col).
I am rephrasing my question.
I need to have "1"s where the difference between two adjacent positions is less than 24.