Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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.



  #3   Report Post  
Member
 
Posts: 58
Default

Quote:
Originally Posted by Big Tony View Post
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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default 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.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total number of days between 2 dates guillottes New Users to Excel 1 March 17th 08 12:06 PM
Converting total number of hours (24 hours) into days MV Rao Excel Discussion (Misc queries) 1 January 24th 08 12:50 PM
how do i convert a number of days to years, months & days? SafetyLen Excel Discussion (Misc queries) 1 August 23rd 07 01:34 AM
Convert Percentage to total number of NPT Days Peledon Excel Worksheet Functions 11 April 19th 07 12:00 PM
how do i display the total number of days in the current month in. timerigger Excel Discussion (Misc queries) 6 March 20th 05 05:13 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"