Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can I convert numeric 0510 to time 05:10 by custom cell format?

I have a text file with times expressed as a numeric - eg 0510. I have a few
hundred lines of input each with this format repeated. I need to change 0510
to 05:10 - ie 10 past 5 in the morning, but when I select the appropriate
time format, it converts it to 00:00 instead of 05:10. Is this automation
possible, perhaps with a custom format or do I have to go through hundreds of
cells putting in a colon?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Can I convert numeric 0510 to time 05:10 by custom cell format?


Rita_H wrote:
I have a text file with times expressed as a numeric - eg 0510. I have a few
hundred lines of input each with this format repeated. I need to change 0510
to 05:10 - ie 10 past 5 in the morning, but when I select the appropriate
time format, it converts it to 00:00 instead of 05:10. Is this automation
possible, perhaps with a custom format or do I have to go through hundreds of
cells putting in a colon?


Hi Rita_H

If your text is in cell A1, try this:

=TIMEVALUE(LEFT(A1,2)&":"&RIGHT(A1,2))

Copy the formula down as necessary and Custom format the result cells
to hh:mm

(Copy and Paste Special Values if you don't want the formula hanging
around.)

Regards

Steve

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Can I convert numeric 0510 to time 05:10 by custom cell format?

In a "helper" column try (assuming ALL the values 4 digits ):

=TIME(LEFT(A1,2),RIGHT(A1,2),0)

If everything is OK, then copy and paste special==values in the "helper"
column and delete original.

HTH



"Rita_H" wrote:

I have a text file with times expressed as a numeric - eg 0510. I have a few
hundred lines of input each with this format repeated. I need to change 0510
to 05:10 - ie 10 past 5 in the morning, but when I select the appropriate
time format, it converts it to 00:00 instead of 05:10. Is this automation
possible, perhaps with a custom format or do I have to go through hundreds of
cells putting in a colon?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Can I convert numeric 0510 to time 05:10 by custom cell format?

Hi Rita,

=time(left(a2,2),right(a2,2),0)

hth
regards from Brazil
Marcelo

"Rita_H" escreveu:

I have a text file with times expressed as a numeric - eg 0510. I have a few
hundred lines of input each with this format repeated. I need to change 0510
to 05:10 - ie 10 past 5 in the morning, but when I select the appropriate
time format, it converts it to 00:00 instead of 05:10. Is this automation
possible, perhaps with a custom format or do I have to go through hundreds of
cells putting in a colon?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can I convert numeric 0510 to time 05:10 by custom cell format?

One mo
=--TEXT(A1,"00\:00\:\0\0")

And format that cell as Time.

Rita_H wrote:

I have a text file with times expressed as a numeric - eg 0510. I have a few
hundred lines of input each with this format repeated. I need to change 0510
to 05:10 - ie 10 past 5 in the morning, but when I select the appropriate
time format, it converts it to 00:00 instead of 05:10. Is this automation
possible, perhaps with a custom format or do I have to go through hundreds of
cells putting in a colon?


--

Dave Peterson
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
How do I convert a # into a time format in Excel, Ex.845 to 8:45 twilliams Excel Worksheet Functions 2 May 4th 06 02:05 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Convert data into standard military time format geog Excel Discussion (Misc queries) 2 December 12th 05 07:46 PM
convert time imported as text to time format for calculations batfish Excel Worksheet Functions 3 October 27th 05 11:24 PM
Reference Cell in custom format???? lil_ern63 Excel Discussion (Misc queries) 3 September 1st 05 02:27 PM


All times are GMT +1. The time now is 02:52 PM.

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"