I am trying to set some data up for further analysis. I have 3 columns in my data set. The first column indicates a project, the second column indicates a task within that project, and the third column indicates the date that task was completed.
What I like to analyze is, for each project, how long it took to get from task number #1 to each other given task within that same project. What I mean by this is the fourth column will always say that task #1 to task #1 was zero days difference, task #1 to task #2 is XXX days difference, Task #1 to task #3 is XXX days difference, and so on so forth, but have this days difference counter only count the difference if the tasks are in the same project. If they are in different projects they should reset.
The tasks are not labeled numerically, and different projects have different tasks, so the only way to know what the first task is is by the minimum date within a project, and the next task will be the closest date to the first task and so forth.
Here is an example spreadsheet of my data setup for the problem I am trying to solve
If you have a better way of organizing a data set like this please feel free to chime in.

