Solved

How to Convert Number to Time value - Excel 2007

Posted on 2011-09-27
8
263 Views
Last Modified: 2012-05-12
Hello experts,

I have a table in excel containing time but written as number (not time values)

For example 600 instead of 06:00

I need your help in developing a user function that would convert 600 to 06:00.

Please see attched sample sheet.

Thank you     Convert-number-to-Time.xlsx
0
Comment
Question by:Mehawitchi
8 Comments
 
LVL 12

Expert Comment

by:viralypatel
ID: 36709950
1. select the entire column
2. right click and select format cells
3. select time.
0
 
LVL 18

Expert Comment

by:x-men
ID: 36709983
A1:600

B1:
=IF(LEN(A1)=3;"0"&LEFT(A1;1)&":"&RIGHT(A1;2);LEFT(A1)&":"&RIGHT(A1;2))
0
 

Author Comment

by:Mehawitchi
ID: 36709986
Hi viralypatel
Thanks for the suggested solution, but I've tried this already and didn't work. It gave me wrong dates and time.

Have you tried it yourself? Did it work?
0
 
LVL 24

Accepted Solution

by:
StephenJR earned 250 total points
ID: 36709998
I don't normally go near date/time questions, but this seems to work for your sample:

=TIME(C2/100,RIGHT(C2,2),0)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 24

Expert Comment

by:StephenJR
ID: 36710001
Took me so long I didn't see all those posts!
0
 
LVL 2

Assisted Solution

by:sanofi-aventis
sanofi-aventis earned 150 total points
ID: 36710016
Mehawitchi,

This is a cell formula. If you need a VBA formula it should be easy to convert.

=TIME(MID(C2,1,CHOOSE(LEN(C2),1,1,1,2)),MID(C2,CHOOSE(LEN(C2),3,3,2,3), 2),0)

Sincerely,
T-Bone
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 100 total points
ID: 36710027
You can use this formula in another column, see attached

=TEXT(C2,"00\:00")+0

format as hh:mm

regards, barry
27343557.xlsx
0
 

Author Comment

by:Mehawitchi
ID: 36710125
Hey, I'm overwhelmed.

All solutions worked but my preference goes to StephenJR because in one step I have a time value
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now