![]() |
Formating Total Number of Days
I am required to maintain a log of the amount if time I work on different
projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. |
Formating Total Number of Days
There may be a cleaner way, but one option would be
=DATEDIF(0,A1,"m")&":"&DATEDIF(0,A1,"md")&":"&TEXT (A1,"hh:mm") Unfortunately, just formatting as mm:dd:hh:mm doesn't work. However, you might want to ask yourself the question as to how you are separating months and days. If it has 32*24 hours, how many months and days is that, and why? Just days hours and minutes would be easier, and less ambiguous. -- David Biddulph "Big Tony" wrote in message ... I am required to maintain a log of the amount if time I work on different projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. |
Quote:
Code:
=DATEDIF(B2,C2-(MOD(B2,1)MOD(C2,1)),"ym")&" months, "&DATEDIF(B2,C2-(MOD(B2,1)MOD(C2,1)),"md")&" days, "&TEXT(MOD(C2-B2,1),"hh"":""mm""""") |
Formating Total Number of Days
I do not have a start and end date. I have calculated the amount of time
each activity has taken. I now have a range of cells that each hold an amount of time (3:12 - 3 hr, 12 min). I would like to total the range and have it show me the total amount of time worked formated in months:days:hours:minutes. I hope this helps explain the problem better. "GoBow777" wrote: Big Tony;676468 Wrote: I am required to maintain a log of the amount if time I work on different projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. You can use a formula to show the desired format; where cell B2 is the start date and cell C2 is the finish date or =NOW() function. Code: -------------------- =DATEDIF(B2,C2-(MOD(B2,1)MOD(C2,1)),"ym")&" months, "&DATEDIF(B2,C2-(MOD(B2,1)MOD(C2,1)),"md")&" days, "&TEXT(MOD(C2-B2,1),"hh"":""mm""""") -------------------- http://www.mvps.org/dmcritchie/excel/datetime.htm -- GoBow777 |
Formating Total Number of Days
I do not have a start and end date. I have calculated the amount of time
each activity has taken. I now have a range of cells that each hold an amount of time (3:12 - 3 hr, 12 min). I would like to total the range and have it show me the total amount of time worked formated in months:days:hours:minutes. I hope this helps explain the problem better. "Big Tony" wrote: I am required to maintain a log of the amount if time I work on different projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. |
Formating Total Number of Days
Didn't you see my reply on 5th June?
-- David Biddulph "Big Tony" wrote in message ... I do not have a start and end date. I have calculated the amount of time each activity has taken. I now have a range of cells that each hold an amount of time (3:12 - 3 hr, 12 min). I would like to total the range and have it show me the total amount of time worked formated in months:days:hours:minutes. I hope this helps explain the problem better. "Big Tony" wrote: I am required to maintain a log of the amount if time I work on different projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. |
Formating Total Number of Days
On Thu, 5 Jun 2008 09:39:01 -0700, Big Tony
wrote: I am required to maintain a log of the amount if time I work on different projects. At the end of a month (and YTD) I need to calculate the total number of month, days, hours and minutes I have spent on each project. I have been using the SUM function, which works fine. But, I cannot figure out the proper formating for the cell to have it display months:days:hours:minutes. Has anyone solved this problem? Thank you for your help. You give too little information. How are you entering your times? Or are you calculating them? If so, how? You want to see results including months. But a month can have 28, 29, 30 or 31 days. What rule do you want to use to decide how many days in your "month"? --ron |
All times are GMT +1. The time now is 10:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com