I'm doing an analysis on medications administration on patients. I have data entries in the thousands and I need to figure out a way to automate and summarize continuous or overlapping date ranges out of several dates and output 1 date range with a beginning date and ending date.
Here's an Example of some dates associated with just one type of drug:
Start Date End Date
9/4/2008 9/11/2008
9/11/2008 9/24/2008
9/25/2008 10/16/2008
10/16/2008 10/30/2008
10/23/2008 12/6/2008
10/31/2008 11/7/2008
11/7/2008 11/19/2008
11/19/2008 12/11/2008
12/7/2008 12/7/2008
12/7/2008 12/18/2008
12/12/2008 12/12/2008
12/12/2008 12/18/2008
dates above should be analyzed and since the rows overlap or are continuous with one another I'd like an output of
9/4/2008 12/18/2008
For a thorough overview of what I'm trying to accomplish, I've attached an example picture of what I've been doing manually in excel for several drugs and the date ranges along with them. For the example picture I've provided, I've manually analyzed the data for 2 drugs with several date entries for each. My summary has come up with 7 date ranges of continuous medication usage.
Any help would be greatly appreciated. Thanks!
Bookmarks