Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Converting :mm:ss to ss

I have data that I export to Excel where the total time comes in as :mm:ss.
I need to convert that format into seconds. For example, my report shows me
:01:25, I need to be able to show that at 85 seconds. I have a formula that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100) where
G2 is 01:25 the result will be 85. but the report i have now comes with an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though. Any
help will be much appreciated!
Phredd
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Converting :mm:ss to ss

Your formula won't work for 01:25 (try it!), but it would give a result of
85 if the G2 had contained 01.25 instead of 01:25.

For your text input of :01:25, you need =60*MID(G2,2,2)+RIGHT(G2,2) or
otherwise =RIGHT(G2,5)*24*60
--
David Biddulph

"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as :mm:ss.
I need to convert that format into seconds. For example, my report shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Converting :mm:ss to ss

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the concatenation
is multiplied by it, the concatenation is turned into an actual time value
(because your value has a time format except for the missing hours part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as :mm:ss.
I need to convert that format into seconds. For example, my report shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Converting :mm:ss to ss

In a day, rather than in a year, I hope, Rick?
--
David Biddulph

"Rick Rothstein (MVP - VB)" wrote in
message ...
Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the concatenation
is multiplied by it, the concatenation is turned into an actual time value
(because your value has a time format except for the missing hours part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Converting :mm:ss to ss

When you get older, like me, time appears to go faster... it **seemed** like
a year to me<g; but yes, you are right, there are 86400 seconds in a
**day**, not a year (of course, the formula still works correctly, in spite
of this misstatement in my attempt to explain why). Thanks for noting that.

Rick


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
In a day, rather than in a year, I hope, Rick?
--
David Biddulph

"Rick Rothstein (MVP - VB)" wrote in
message ...
Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the
concatenation is multiplied by it, the concatenation is turned into an
actual time value (because your value has a time format except for the
missing hours part... which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report
shows me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Converting :mm:ss to ss

Rick,

Thank you so much for your help that worked great! I did discover another
problem i could use anyones' help with related to the same thing. Some of my
data is reflected as h:mm:ss, (which i didn't discover last night) and the
formula you provided to me returns a result of #VALUE for those cells. is
there a way also capture the h: also in a ss format? for example 1:01:23 as
3683.

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the concatenation
is multiplied by it, the concatenation is turned into an actual time value
(because your value has a time format except for the missing hours part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as :mm:ss.
I need to convert that format into seconds. For example, my report shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Converting :mm:ss to ss

My fault... I should not have used two zeroes in the concatenation... one
zero would have been enough for your original problem AND would also work
for the entries you just wrote about as long as you NEVER more than 9 in the
hours position (that is, either an entry like your original post showed or,
if an hour is present, the time value is 9:59:59 or less).

=86400*("0"&G2)

Rick


"Phredd" wrote in message
...
Rick,

Thank you so much for your help that worked great! I did discover another
problem i could use anyones' help with related to the same thing. Some of
my
data is reflected as h:mm:ss, (which i didn't discover last night) and
the
formula you provided to me returns a result of #VALUE for those cells. is
there a way also capture the h: also in a ss format? for example 1:01:23
as
3683.

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the
concatenation
is multiplied by it, the concatenation is turned into an actual time
value
(because your value has a time format except for the missing hours
part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report
shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes
with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for
the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Converting :mm:ss to ss

If you want to cope both with 1:01:23 and :01:23, try
=IF(LEN(A2)6,A2,RIGHT(A2,5)/60)*24*3600
--
David Biddulph

"Phredd" wrote in message
...
Rick,

Thank you so much for your help that worked great! I did discover another
problem i could use anyones' help with related to the same thing. Some of
my
data is reflected as h:mm:ss, (which i didn't discover last night) and
the
formula you provided to me returns a result of #VALUE for those cells. is
there a way also capture the h: also in a ss format? for example 1:01:23
as
3683.

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the
concatenation
is multiplied by it, the concatenation is turned into an actual time
value
(because your value has a time format except for the missing hours
part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report
shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes
with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for
the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Converting :mm:ss to ss

Rick,

Thanks, both you and David are awesome! Thank you so much. You guys are
Excel Rock Stars!

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

My fault... I should not have used two zeroes in the concatenation... one
zero would have been enough for your original problem AND would also work
for the entries you just wrote about as long as you NEVER more than 9 in the
hours position (that is, either an entry like your original post showed or,
if an hour is present, the time value is 9:59:59 or less).

=86400*("0"&G2)

Rick


"Phredd" wrote in message
...
Rick,

Thank you so much for your help that worked great! I did discover another
problem i could use anyones' help with related to the same thing. Some of
my
data is reflected as h:mm:ss, (which i didn't discover last night) and
the
formula you provided to me returns a result of #VALUE for those cells. is
there a way also capture the h: also in a ss format? for example 1:01:23
as
3683.

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the
concatenation
is multiplied by it, the concatenation is turned into an actual time
value
(because your value has a time format except for the missing hours
part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report
shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes
with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for
the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Converting :mm:ss to ss

David,

Thank you so much for your help. I am just amazed at how much knowledge is
out there. Thanks for sharing. I wish I could buy you both a drink for your
help.

Phredd.

"David Biddulph" wrote:

If you want to cope both with 1:01:23 and :01:23, try
=IF(LEN(A2)6,A2,RIGHT(A2,5)/60)*24*3600
--
David Biddulph

"Phredd" wrote in message
...
Rick,

Thank you so much for your help that worked great! I did discover another
problem i could use anyones' help with related to the same thing. Some of
my
data is reflected as h:mm:ss, (which i didn't discover last night) and
the
formula you provided to me returns a result of #VALUE for those cells. is
there a way also capture the h: also in a ss format? for example 1:01:23
as
3683.

Phredd.

"Rick Rothstein (MVP - VB)" wrote:

Try this...

=86400*("00"&G2)

where 86400 is the number of seconds in a year and, when the
concatenation
is multiplied by it, the concatenation is turned into an actual time
value
(because your value has a time format except for the missing hours
part...
which the concatenation puts in).

Rick


"Phredd" wrote in message
...
I have data that I export to Excel where the total time comes in as
:mm:ss.
I need to convert that format into seconds. For example, my report
shows
me
:01:25, I need to be able to show that at 85 seconds. I have a formula
that
will convert mm:ss to seconds which is =INT(G2)*60+((G2-INT(G2))*100)
where
G2 is 01:25 the result will be 85. but the report i have now comes
with
an
extra :. I cannot seem to be able to automatically remove the : at the
begining of the expression or modify my formula above to account for
the
extra :. I am sure this is pretty simple it is just beyone me though.
Any
help will be much appreciated!
Phredd





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
Converting ASC to csv [email protected] Excel Discussion (Misc queries) 2 April 3rd 23 07:34 PM
Converting EST to PST neilalan Excel Worksheet Functions 4 April 19th 12 11:17 PM
Converting a date to a text field w/o converting it to a julian da LynnMinn Excel Worksheet Functions 2 March 6th 08 03:43 PM
converting [email protected] Excel Discussion (Misc queries) 2 August 4th 06 11:44 PM
Converting QIF to XLS JVinocur Excel Discussion (Misc queries) 3 March 31st 06 04:09 PM


All times are GMT +1. The time now is 10:36 AM.

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

About Us

"It's about Microsoft Excel"