Sum total of D:h:mm values

awwphooey

New Member
Joined
Aug 15, 2007
Messages
15
Hello again-
I’ve once more hit a wall. I’ve searched both Excel help and the BB, but not having much success on this one, probably because I'm not phrasing my query correctly.

You’ve helped me figure out how to calculate number of D:h:mm between dates by using:

=TEXT(F3-E3,"D:h:mm")
business objects spaced out v.1.xls
ABCDEFG
3CRF655811720.308(Approve)cward10/19/0611:29AM11/20/0610:41AM31:23:11
4CRF655811720.308(Approve)bensmith10/19/0611:29AM11/16/062:53PM28:3:24
5CRF655811720.308(Assessment)jgeslien9/15/061:49PM10/5/0611:14AM19:21:24
6CRF655811720.308(Approve)twiley10/19/0611:29AM11/1/068:47AM12:21:17
7CRF655811720.308(Assessment)twiley10/6/066:51AM10/18/061:27PM12:6:35
8CRF655811720.308(Approve)jgeslien10/19/0611:29AM10/27/064:16PM8:4:46
9CRF655811720.308(Approve)shaylock10/19/0611:29AM10/26/063:58PM7:4:28
10CRF655811720.308(Approve)hduleck10/19/0611:29AM10/20/063:06PM1:3:37
11CRF655811720.308(Review)rkellogg9/14/063:03PM9/15/061:49PM0:22:46
12CRF655811720.308(Assessment)jgeslien10/5/061:52PM10/5/065:07PM0:3:14
13CRF655811720.308(Review)hduleck9/14/061:59PM9/14/063:03PM0:1:03
14CRF655811720.308(Review)lkelly10/5/061:51PM10/5/061:52PM0:0:00
15CRF655811720.308(Review)weedle10/6/066:50AM10/6/066:51AM0:00
16
17
Report 1


Now that I’ve successfully acquired these values, how can I calculate the total D:h:mm spent on column A, and then average that total time?

Thanks in advance, once again.
Phoo
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
how can I calculate the total D:h:mm spent on column A, and then average that total time?

Not sure what this means, column A is all the same, does that mean you just want to total the whole of column G and/or average that column?

You have a couple of problems with a formula like

=TEXT(F3-E3,"D:h:mm")

Firstly it returns a text value which is more difficult to sum, secondly it won't give you the correct result if any time difference is greater than 31D:23:59.

If you want to sum column G for a specific number in A try

=SUMPRODUCT(--(A3:A15="CRF65581"),F3:F15-E3:E15)

format as number to get result in days, i.e. 33.5 = 33 days 12 hrs.

If you actually want the result to look like 33 days 12:00 then use

=INT(SUMPRODUCT(--(A3:A15="CRF65581"),F3:F15-E3:E15))&" days "&TEXT(SUMPRODUCT(--(A3:A15="CRF65581"),F3:F15-E3:E15),"hh:mm")
 
Upvote 0
whoops

Barry-

Thanks again, I was so excited I forgot the second part of my question (apologies for not being clear enough the first time).

So now I'm at this point:
business objects spaced out v.3.xls
ABCDEFG
3CRF655811720.308(Approve)cward10/19/0611:29AM11/20/0610:41AM31:23:11
4CRF655811720.308(Approve)bensmith10/19/0611:29AM11/16/062:53PM28:3:24
5CRF655811720.308(Assessment)jgeslien9/15/061:49PM10/5/0611:14AM19:21:24
6CRF655811720.308(Approve)twiley10/19/0611:29AM11/1/068:47AM12:21:17
7CRF655811720.308(Assessment)twiley10/6/066:51AM10/18/061:27PM12:6:35
8CRF655811720.308(Approve)jgeslien10/19/0611:29AM10/27/064:16PM8:4:46
9CRF655811720.308(Approve)shaylock10/19/0611:29AM10/26/063:58PM7:4:28
10CRF655811720.308(Approve)hduleck10/19/0611:29AM10/20/063:06PM1:3:37
11CRF655811720.308(Review)rkellogg9/14/063:03PM9/15/061:49PM0:22:46
12CRF655811720.308(Assessment)jgeslien10/5/061:52PM10/5/065:07PM0:3:14
13CRF655811720.308(Review)hduleck9/14/061:59PM9/14/063:03PM0:1:03
14CRF655811720.308(Review)lkelly10/5/061:51PM10/5/061:52PM0:0:00
15CRF655811720.308(Review)weedle10/6/066:50AM10/6/066:51AM0:00:00
16
17122days19:53
Report 1


is there a way to average G3:G15?

Thanks in advance yet again.

Phoo
 
Upvote 0
Does this depend on what's in column A?

If you just want the average time difference for all the entries

=SUMPRODUCT(F3:F15-E3:E15)/MAX(COUNT(F3:F15),1)

or if you want to average for a specific number in column A

=SUMPRODUCT(--(A3:A15="CRF65581"),F3:F15-E3:E15)/MAX(COUNTIF(A3:A15,"CRF65581"),1)
 
Upvote 0
Barry (et. al.)- since your last instruction, I've been continuing to do due diligence before looking to the board, but am not successful figuring out some additional manipulations I'd like to make.

You showed me how to use =INT(SUMPRODUCT(F90:F96-E90:E96))&" days "&TEXT(SUMPRODUCT(F90:F96-E90:E96),"hh:mm") to obtain the total number of days spent in column G (I removed the reference to Column A from your formula, as the CRF's play no part in the data- they are just document numbers. I'm trying to find time spent on those docs.).
business objects spaced out v.3.xls
ABCDEFG
90CRF613851740.015(Approve)mskoog5/15/0610:18AM6/15/061:45PM31:3:27
91CRF613851740.015(Review)eedolan4/24/061:05PM5/6/0611:04AM11:21:58
92CRF613851740.015(Approve)corinna5/15/0610:18AM5/23/063:43PM8:5:25
93CRF613851740.015(Assessment)amelia5/6/0611:04AM5/11/066:44PM5:7:39
94CRF613851740.015(Approve)phlexus5/15/0610:18AM5/17/064:40AM1:18:21
95CRF613851740.015(Approve)silva5/15/0610:18AM5/16/062:56AM0:16:37
96CRF613851740.015(Approve)ldwilson5/25/067:37PM5/25/067:40PM0:0:02
9759days01:32
98CRF68461G97052(Approve)mskoog12/19/063:02PM1/19/075:25PM31:2:23
99CRF68461G97052(Approve)marco12/19/063:01PM12/22/0612:19PM2:21:17
100CRF68461G97052(Assessment)jolgin12/9/067:30AM12/11/061:24PM2:5:53
101CRF68461G97052(Approve)mitchl12/19/063:02PM12/20/065:36PM1:2:34
102CRF68461G97052(Review)garyt12/8/0610:42AM12/9/067:30AM0:20:48
10338days04:57
Report 1


I've been doing this manually for each CRF document on my sheet. With over 7,000 lines of data though, this has been taking me some time. Is there a way of setting up an additional formula / macro which will add the column G data for each separate CRF in Column A?

Many thanks in advance, again.

Phoo
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

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