# help with excel time/text formatting

I have cells in the "general" format that contain time data listed (as text) like this:

02m 10s
15m 00s
71m 51s
08m 01s

etc

I need a formula to convert this to a value I can work with - ie, work with as a number or correctly formatted time field so I can run stats off it. I've tried playing with =VALUE(LEFT(A1,2)) etc but get stuck.

Ta!
LVL 2
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
You can use a formula like this:

=TIMEVALUE("00:"& LEFT(A1,2)&":"&MID(A1,5,2))

Please take a look at the attached file.

jppinto
Book1.xlsx
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

IT Pro/DeveloperCommented:
Something like this should work:

=TIME(0;LEFT(A1;2);MID(A1;5;2))

For values on A1
0
Author Commented:
Perfect - exactly what I needed, and even included a demo. Very thoughtful, and I'm grateful.
0
Author Commented:
jpaulino - unfortunately your solution didn't work - it gave an error. Thanks for the attempt though!
0
IT Pro/DeveloperCommented:
The error you got is because your system uses commas and not semi-comma. If you change to this it will work (I forgot to change it):

=TIME(0,LEFT(A1,2),MID(A1,5,2))

0
Commented:
jpaulino solution works also! The problem is that he posted the formula like this:

=TIME(0;LEFT(A1;2);MID(A1;5;2))

When he should have posted like this:

=TIME(0,LEFT(A1,2),MID(A1,5,2))

This has to do with regional settings where you use , when his Excel uses ;

Take a look at the attached file to see he's formula working.

jppinto

Book1.xlsx
0
Author Commented:
ah perfect! many thanks guys - you have saved me hours of head scratching :)
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.