Sum Column Differences between date range

Kellogg

New Member
Joined
Mar 30, 2013
Messages
41
Platform
  1. Windows
  2. MacOS
Code:
Dear Great Minds of Excel,


I have the following data (Except column D)

Column A     Column B        Column C       Column D     Column E     Column F      Column G
Date 1         Start Time 1    End Time 2     Difference    Start Date    End Date       Avg Time to Complete
01/01/14     08:00              08:30             00:30          2/1/14         2/28/14        00:25
01/0714       09:00             09:10              00:10
02/04/14     10:00              10:18              00:18
02/22/14     11:00              11:02              00:02
02/25/14     12:00              12:30              00:30


I want a vba code that will calculate the time difference between Column B and Column C (shown in column D) then calculate the average time to complete tasks over a date range designated in Cells E1 and F1.

Cell E1 = 02/01/14 This is the start of the date range.
Cell F1 = 02/28/14 This is the end of the date range.
Cell G1 = Average time to complete task within date range.

I do not need to have the differences listed in column D.  This is for clarification. The answer should be 00:18 + 00:02 + 00:30 / 3 = 00:25. 

Something using:
Application.Worksheetfunction.sumifs(DateRange1, ......

Any help is always appreciated.  Thanks
 
Joeu2004,

A second solution that works! Thanks. I use the Sumifs and Countifs and this is a great lesson. Another early Christmas present.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top