Hey guys, I was wondering how would go about doing this:
I have a data set of unique ID's and two date columns.
Ex.
[TABLE="width: 271"]
<tbody>[TR]
[TD]Unique ID[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/10/2000[/TD]
[TD="align: right"]1/15/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/16/2000[/TD]
[TD="align: right"]1/20/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/21/2000[/TD]
[TD="align: right"]1/23/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2/1/2000[/TD]
[TD="align: right"]2/4/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2/5/2000[/TD]
[TD="align: right"]2/8/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/2/2000[/TD]
[TD="align: right"]2/7/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/8/2000[/TD]
[TD="align: right"]2/12/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3/1/2000[/TD]
[TD="align: right"]3/3/2000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3/4/2000[/TD]
[TD="align: right"]3/7/2000[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
How would I be able to only select the EARLIEST consecutive dates for each unique ID's. Ideally, after the filtering, the data set would look like this:
[TABLE="width: 271"]
<tbody>[TR]
[TD]Unique ID[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/10/2000[/TD]
[TD="align: right"]1/15/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/16/2000[/TD]
[TD="align: right"]1/20/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/21/2000[/TD]
[TD="align: right"]1/23/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/2/2000[/TD]
[TD="align: right"]2/7/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/8/2000[/TD]
[TD="align: right"]2/12/2000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3/4/2000[/TD]
[TD="align: right"]3/7/2000[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
What's really throwing me off is that third column of end date. I've reference a few posts on this site where you can filter out entries based on consecutive dates, but in the examples the dates have always been individually present and never in a span across two columns.
Thank you in advance!
I have a data set of unique ID's and two date columns.
Ex.
[TABLE="width: 271"]
<tbody>[TR]
[TD]Unique ID[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/10/2000[/TD]
[TD="align: right"]1/15/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/16/2000[/TD]
[TD="align: right"]1/20/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/21/2000[/TD]
[TD="align: right"]1/23/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2/1/2000[/TD]
[TD="align: right"]2/4/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2/5/2000[/TD]
[TD="align: right"]2/8/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/2/2000[/TD]
[TD="align: right"]2/7/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/8/2000[/TD]
[TD="align: right"]2/12/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3/1/2000[/TD]
[TD="align: right"]3/3/2000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3/4/2000[/TD]
[TD="align: right"]3/7/2000[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
How would I be able to only select the EARLIEST consecutive dates for each unique ID's. Ideally, after the filtering, the data set would look like this:
[TABLE="width: 271"]
<tbody>[TR]
[TD]Unique ID[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/10/2000[/TD]
[TD="align: right"]1/15/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/16/2000[/TD]
[TD="align: right"]1/20/2000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]1/21/2000[/TD]
[TD="align: right"]1/23/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/2/2000[/TD]
[TD="align: right"]2/7/2000[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2/8/2000[/TD]
[TD="align: right"]2/12/2000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3/4/2000[/TD]
[TD="align: right"]3/7/2000[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
What's really throwing me off is that third column of end date. I've reference a few posts on this site where you can filter out entries based on consecutive dates, but in the examples the dates have always been individually present and never in a span across two columns.
Thank you in advance!