Hi all,
Currently my data is like this :
Activity | Start_Date | End_Date |
Kayaking | 1/09/17 | 2/09/17 |
Kayaking | 1/09/17 | 2/09/17 |
Running | 3/09/17 | 3/09/17 |
I want to alter it so that if the same activity, in this case "Kayaking" starts on the same start date and end date, it'll only take one row of the data instead of both.
So end result will be :
Activity | Start_Date | End_Date |
Kayaking | 1/09/17 | 2/09/17 |
Running | 3/09/17 | 3/09/17 |
Thanks!
Solved! Go to Solution.
Hi Mark,
Great answer! What if my data is like this :
Activity | Start_Date | End_Date | Total days |
Kayaking | 1/09/17 | 2/09/17 | 2 |
Kayaking | 2/09/17 | 2/09/17 | 1 |
Running | 3/09/17 | 3/09/17 | 1 |
( I changed the start_date for the second row kayaking)
And I want to make sure that the same activity, kayaking doesn't collide with each other on any dates. So if first row's kayaking ends on 2/09/17 and second row's kayaking starts on 2/09/17, it'll remove the second row's data.
Ultimately my end goal is to be able to sum up the total number of days for different activities. So Kayaking should be 2 days and Running one day. If the two of the same activity collides with each other, it wouldn't be counted. Any other solutions to do it out is fine too!
So desired output would be :
Activity | Start_Date | End_Date | Total Days |
Kayaking | 1/09/17 | 2/09/17 | 2 |
Running | 3/09/17 | 3/09/17 | 1 |
Thanks!
Yes, the start date may be between the original dates and goes over the end.