I have a spreadsheet with 3 columns and x number of rows. The headers look like: Description, Start Date, End Date. I need to loop through the rows and calculate the time difference for each one. If the description is the same as the previous row then ignore it. If it's different I need to calculate the total time difference.

Example:
Desc 1 1/26/2012 14:53:02 1/26/2012 14:53:11
Desc 1 1/26/2012 14:53:02 1/26/2012 14:53:11
Desc 2 1/26/2012 12:55:00 1/26/2012 12:55:09
Desc 2 1/26/2012 12:55:00 1/26/2012 12:55:09
Desc 2 1/26/2012 10:24:30 1/26/2012 10:24:48
Desc 2 1/26/2012 10:24:30 1/26/2012 10:24:48

I need the results to be entered in a new worksheet to look something like:
Description Duration Occurrences
Desc 1 00:09.0 2
Desc 2 00:27.0 4

If the times are the same with the same description then they are ignored. I have no idea where to being. I am a PHP developer so if I can get some help getting started I can probably figure it out.