Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
thanks for taking the time to explain that one, cause it had me really confused. JJ "Tom Ogilvy" wrote in message ... time is stored as the elapsed number of days from a base date. So the whole number is the number of days and the fractional portion is the number of hours. By dividing by 24, this converts the 26.1234 hours to a date serial number. When displaying a date serial number with a date format, Excel will see the serial as this elapsed time, so 26.1234 hours would be 1 day and two hours. To get Excel not to "extract" the full days / 24 hours periods, you can put brackets around the format for the hour portion - then it will show 26. You can also do minutes [mm]:ss and then the total number of minute would be shown rather than extracting out the hours. Regards, Tom Ogilvy Guy LaRochelle wrote in message ... So we now have to format the pseudo-time part bit, and we can do that in the formula by using the TEXT function =TEXT(ABS(A1/24),"[h].mm.ss") which gives us the same result as above if we had used custom cell formats. Put it all together, and we finally have in B1 =TEXT(ABS(A1/24),"[h].mm.ss") & IF(A1<0,"S","N") and I think that this is exactly what you want, so just copy it down column Bob, Can you explain the format "[h].mm.ss"............I don't understand the square brackets around the "h". When 26.1234 is in A1 and I remove the brackets from the formula it displays a 2 instead of 26. I don't understand and can't find documentation on that type of format. Can you explain? Regards. -Guy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Programming | Excel Discussion (Misc queries) | |||
ISERROR,SMALL,INDEX, MATCH, SMALL?? | Excel Discussion (Misc queries) | |||
ExCel programming | Charts and Charting in Excel | |||
Excel Programming | New Users to Excel | |||
Excel Programming help | Excel Worksheet Functions |