LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Limit to hours in elapsed time format?

Each year I receive a text file or HTML which I have to convert to an Excel
spreadsheet and separate the data by means of Text to Columns. Once this is
done I must calculate the total time of usage for each group (Cost Center).
The problem is the some of the cells have the time in the format
DAYS:HOURS:MINUTES:SECONDS. To solve this problem I have used the LEFT
function to separate the DAYS and multiply this by 24 hours to give the total
hours for days. Then I use the MID function to separate the hours and add
this to the total hours for days. This total is combined with the minutes
and seconds and put in a cell with the numberformat of "[h]:mm:ss". This
worked fine last year. This year I discovered if the hours were over 9999
the numberformat changed to "Text" and could not be calculated. So to solve
this problem I copied the line and subtracted from the total 9999 and use
this as the hours for the first line. The second line has the remainder of
the hours. When I totaled all of the hours there was no problem with the
grand total or even the subtotals having more than 9999 hours. My questions
is why did I have to do this in the first place? Is there a limit to the
amount of hours the elapsed time will show? Any suggestions for a more
efficient code.
 
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
Format for elapsed time Mr. B in VT Excel Discussion (Misc queries) 2 February 9th 10 08:46 PM
Elapsed Time over 24 hours Fast Learner Excel Worksheet Functions 7 July 18th 06 01:53 AM
elapsed time format EdStevens[_2_] Excel Programming 1 April 17th 06 02:43 PM
How to convert an elapsed time in minutes to Days hours and minute Time Tracker Excel Discussion (Misc queries) 1 April 9th 06 03:40 AM
Elapsed Time in Hours, Minutes and Seconds [email protected] Excel Programming 1 March 2nd 06 07:45 PM


All times are GMT +1. The time now is 03:33 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"