Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2015, 04:34 AM
Nina46 Nina46 is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 32bit Calculate Average Time Elapsed in Days, hours and minutes Office 2007
Novice
Calculate Average Time Elapsed in Days, hours and minutes
 
Join Date: Sep 2015
Posts: 6
Nina46 is on a distinguished road
Question Calculate Average Time Elapsed in Days, hours and minutes

Hi!

Im trying to calculate the average time elasped in 2 columns in Days, Hours and Minutes format. I have used

=INT(I10-H10)&" Days, "&HOUR(I10-H10)&" Hours, "&MINUTE(I10-H10)&" Minutes"



to get the time elapsed. However, when I try to get the average in the column I get either #DIV/0 or #Value! error message.

Some of the time elapsed goes over 30 days so just using I10-H10 doesnt give the correct answer in those instances.

Help!

Copy of some of the document below.

ORDERED DATEFILMED DATEREPORT DATEOrd-FilFil-Sig02/07/2015 23:1003/07/2015 10:1603/07/2015 12:040 Days, 11 Hours, 6 Minutes0 Days, 1 Hours, 48 Minutes03/07/2015 07:4403/07/2015 10:5403/07/2015 13:060 Days, 3 Hours, 10 Minutes0 Days, 2 Hours, 12 Minutes03/07/2015 11:4503/07/2015 12:1903/07/2015 13:100 Days, 0 Hours, 34 Minutes0 Days, 0 Hours, 51 Minutes02/07/2015 22:1302/07/2015 22:5403/07/2015 13:160 Days, 0 Hours, 41 Minutes0 Days, 14 Hours, 22 Minutes01/07/2015 22:1102/07/2015 03:1003/07/2015 14:080 Days, 4 Hours, 59 Minutes1 Days, 10 Hours, 58 Minutes

Thanks in advance!
Reply With Quote
  #2  
Old 09-07-2015, 02:31 AM
macropod's Avatar
macropod macropod is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 64bit Calculate Average Time Elapsed in Days, hours and minutes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Nina46 View Post
Im trying to calculate the average time elasped in 2 columns in Days, Hours and Minutes format. I have used

=INT(I10-H10)&" Days, "&HOUR(I10-H10)&" Hours, "&MINUTE(I10-H10)&" Minutes"

to get the time elapsed.
Why are you doing it that way instead of just using a custom number format? Since you're turning your calculation into text, there is no easy way to turn it back into a number for averaging. The only way around that would be to use a formula that goes back to the inputs, not the outputs.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-07-2015, 03:24 AM
Nina46 Nina46 is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 32bit Calculate Average Time Elapsed in Days, hours and minutes Office 2007
Novice
Calculate Average Time Elapsed in Days, hours and minutes
 
Join Date: Sep 2015
Posts: 6
Nina46 is on a distinguished road
Default

I reckoned i was over complicating things a bit! Have spent a couple of days online trying to solve the problem!

The main problem is when I try to subtract one date/time from another date/time in the same month, the answer is right.

When I subtract one date/time from another date/time in different months/years, the answer is way wrong.

Then each month I have to get an average turnaround time of each column - and this is when I get the error message....

I had already custom formated the columns as "dd" Days "hh" Hours "mm" mins - should I change this?

I Had originally thought when I started getting these stats it would be a simple A2-A1 to get the difference and then use the AVERAGE() to get the average time - but nothing is ever simple with excel I have discovered!!
Reply With Quote
  #4  
Old 09-07-2015, 04:35 AM
macropod's Avatar
macropod macropod is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 64bit Calculate Average Time Elapsed in Days, hours and minutes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Where the differences are up to 31 days, you can use simple subtraction and average, with a custom number format like:
d" days, "h" hours & "m" minutes"
For anything more than a month, you'd probably do best to work with a simply numeric format that expresses the output in decimal days, rather than trying to get it to do days, hours & minutes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-08-2015, 02:34 AM
Nina46 Nina46 is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 32bit Calculate Average Time Elapsed in Days, hours and minutes Office 2007
Novice
Calculate Average Time Elapsed in Days, hours and minutes
 
Join Date: Sep 2015
Posts: 6
Nina46 is on a distinguished road
Default

Ok, so when I do that is the answer i am seeing (2291.07) in hours? Is there a way to change that to days, hours and minutes without getting a wrong answer?

Head completly wrecked over this!

Thanks.
Reply With Quote
  #6  
Old 09-08-2015, 05:33 AM
macropod's Avatar
macropod macropod is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 64bit Calculate Average Time Elapsed in Days, hours and minutes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I can't see where you'd get 2291.07 from using the data you posted. That said, if you used a simple subtraction, the 2291.07 is 2291.07 days.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 09-08-2015, 05:33 AM
Nina46 Nina46 is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 32bit Calculate Average Time Elapsed in Days, hours and minutes Office 2007
Novice
Calculate Average Time Elapsed in Days, hours and minutes
 
Join Date: Sep 2015
Posts: 6
Nina46 is on a distinguished road
Default

Hi,

I found a solution on another website using the A2-A1 formula and custom formating the answer as [h]:mm I was able to get my answer in hours and minutes format.

The formula I found to change the sum total of hours and mins to days, hours and mins was (assuming my answer was in cell A25)

=INT(A25) &" Days" & INT(MOD(A25,INT(A25))*24) &" Hours and " & MINUTE(A25) & "Minutes"

So with this in mind, is there a way to further change this answer to Months, days, hours and minutes or am I trying to do the impossible with Excel?!

Thanks.
Reply With Quote
  #8  
Old 09-08-2015, 05:52 AM
macropod's Avatar
macropod macropod is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 64bit Calculate Average Time Elapsed in Days, hours and minutes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The formula you're using returns a result that is text, not a number, which makes it very difficult to do any further calculations with it. Besides which, there is no such thing as a standard 'month', so you can't just divide the number of days by a constant and expect a reliable result. That said, you could use the DATEDIF function to express the number of days as calendar months - but only if you have both the starting date and the end date to which the number (2291.07 - which is actually more than 8.6 years) relates.

Since none of the data from your first post spans even one week, it's difficult to understand what it is you're having issues with on that score. Perhaps you should attach a workbook to a post with some representative data. You can do that via the paperclip symbol on the Advanced posting menu.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 09-08-2015, 06:30 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 64bit Calculate Average Time Elapsed in Days, hours and minutes Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,767
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Post #7 seems to indicate that you have posted the same question on another forum?

If so, please post a link to that forum and read http://www.excelguru.ca/content.php?184 to see why.
Thank you
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #10  
Old 09-11-2015, 02:09 AM
Nina46 Nina46 is offline Calculate Average Time Elapsed in Days, hours and minutes Windows 7 32bit Calculate Average Time Elapsed in Days, hours and minutes Office 2007
Novice
Calculate Average Time Elapsed in Days, hours and minutes
 
Join Date: Sep 2015
Posts: 6
Nina46 is on a distinguished road
Default

Thanks for your help but I realised I was using SUM() instead of AVERAGE(), that was why the answer was so big! Finally sorted!

Thanks for all your help.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Average Time Elapsed in Days, hours and minutes Trouble with absolute values and hours/minutes and formulas dglazer Excel 2 07-28-2015 01:42 AM
Calculate Average Time Elapsed in Days, hours and minutes Need a formula to calculate turnaround time in hours ram_cl1981 Excel 5 09-29-2014 02:20 PM
How to transform hours into minutes in mail merge ppochelon Mail Merge 1 09-29-2013 07:07 PM
Calculate Average Time Elapsed in Days, hours and minutes Calculate difference by days and hours alysolyman Excel 6 05-13-2013 02:19 AM
Calculate Average Time Elapsed in Days, hours and minutes Calculate elapsed time in Word table? Snvlsfoal Word Tables 1 08-11-2011 05:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft