Good afternoon, This is great! Hope i explain this better this time. The first rule between dates is good So, say for ID#1 orderdate= 10/02/2017 will be Line = 3; It falls between line 3 LOEND 11/14/2016 and line 4 LOSTART 11/27/2017 and is still considered line 3. Again, for ID#5, orderdate = 7/31/2016 will be line 2; it falls between line 2 LOEND 12/27/2015 and line 3 LOSTART 08.05/2016 and is still considered line 2. You had this in the solution and it works great: If order occurs before LINE 1 then it is considered 0. For Example: ID#7 row 8: Line is considered 0 because the order date of 5/10/2016 occurs before LOSTART date of 6/5/2016. I have the final solution below. ID Order LINE 1 7/16/2016 2 1 10/2/2017 3 2 7/18/2016 1 3 7/18/2016 3 4 7/26/2016 2 5 7/31/2016 2 6 7/31/2016 2 7 5/10/2016 0
... View more