View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Greg Greg is offline
external usenet poster
 
Posts: 331
Default convert dd:hh:mm:ss to seconds

Hi Luke:

Sorry, the 86400 doesn't work for my situation. I get a #VALUE! error. Is
there a way to force the cell to a certain format (currently dumped out of
the phone system as "General") to perform the calculation?

For example, I have found the following, but it's too involved for what I am
trying to do, and mainly I don't understand the whole formula:

=--TEXT(SUBSTITUTE(IF(ISERR(--$D$10),'$D$10,--$D$10),":","Jan1900 ",1), "[s]")

TIA

Greg



"Luke M" wrote:

Multiplying by 86400 will work for both. If days are included, 1 day = 86400
seconds, so your math still works out.

Note that you could also just use a custom format of:
[s]
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Greg" wrote:

I need to change some data to seconds. One of the problems is that some of
the data in the column is a subtotal, so the data is dd:hh:mm:ss where some
of it is hh:mm:ss.

Is there one formula that I can use as part of others (IF, SUMPRODUCT, etc.)
that coverts both dd:hh:mm:ss and hh:mm:ss to seconds?

I currently just multiply hh:mm:ss by 86400 to convert it to seconds.

TIA,
Greg