Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ade
 
Posts: n/a
Default format a six figure number to a time.

Hi there
I'm an inexperienced excel user but have been given a task to present some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring the
data over but have been following the help files provided by office online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within a
cell in excel? Every time I try to format the cell it just gives me nonsense
output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but can
anybody give me a clue?
Thanks in advance
Adrian


  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default format a six figure number to a time.

Hi!

What does 105306 represent?

10 hrs 53 mins 06 secs
10:53:06 AM
10:53:06 PM

Are all the strings 6 digits?

Can you provide more samples?

Biff

"Ade" wrote in message
...
Hi there
I'm an inexperienced excel user but have been given a task to present some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring the
data over but have been following the help files provided by office online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within a
cell in excel? Every time I try to format the cell it just gives me
nonsense output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but can
anybody give me a clue?
Thanks in advance
Adrian




  #3   Report Post  
Posted to microsoft.public.excel.misc
Leith Ross
 
Posts: n/a
Default format a six figure number to a time.


Hello Ade,

You need to use string functions to break the time code apart since
this a non-standard Excel format for time.

VBA EXAMPLE:
Dim H, M, S
Dim TimeCode As String

TimeCode = "105306"
H = Left(TimeCode, 2) & ":"
M = Mid(TimeCode,3, 2) & ":"
S = Right(TimeCode, 2)

Range("A1") = H & M & S

A1 will display 10:53:06

There are equivalent Worksheet Functions to do this also.

WORKSHEET FORMULA EXAMPLE:
A1 = 105306
B1 contains the formula =LEFT(A1, 2) & ":" & MID(A1, 3, 2) & ":" &
RIGHT(A1, 2)

B1 will display 10:53:06

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=503554

  #4   Report Post  
Posted to microsoft.public.excel.misc
Pete
 
Posts: n/a
Default format a six figure number to a time.

The following should get them into Excel time format, assuming the 6
digit number is in cell A1:

=VALUE(LEFT(A1,2)&":"&MID(A1,3,2)&":"&RIGHT(A1,2))

Format as time and 13:30:55. Copy the formula down.

I assume that all numbers are 6 digit, i.e. that you have leading
zeroes for a time like 8:15:00.

Hope this helps.

Pete

  #5   Report Post  
Posted to microsoft.public.excel.misc
bigwheel
 
Posts: n/a
Default format a six figure number to a time.

One way would be to use a formula to create the desired format i.e. 105386 in
cell A1. In B1, LEFT(A1,2)&":"&MID(A1,3,2) would give 10:53 and in C1,
RIGHT(A1,2) would give 06

This may not be what you want if you're hoping to do some calculations with
the results

"Ade" wrote:

Hi there
I'm an inexperienced excel user but have been given a task to present some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring the
data over but have been following the help files provided by office online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within a
cell in excel? Every time I try to format the cell it just gives me nonsense
output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but can
anybody give me a clue?
Thanks in advance
Adrian





  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default format a six figure number to a time.

On Fri, 20 Jan 2006 23:45:23 -0000, "Ade"
wrote:

Hi there
I'm an inexperienced excel user but have been given a task to present some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring the
data over but have been following the help files provided by office online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within a
cell in excel? Every time I try to format the cell it just gives me nonsense
output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but can
anybody give me a clue?
Thanks in advance
Adrian


You first need to convert that six digit number into something Excel will
understand as a time; and then format that result appropriately:

e.g. with data in A1

B1: =--TEXT(A1,"00\:00\:00")

Then Format/Cells/Number/Custom Type: hh:mm:ss


--ron
  #7   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default format a six figure number to a time.

=LEFT(A1,2)&":"&MID(A1,3,2)&" and "&IF(MID(A1,5,1)="0",RIGHT(A1,1)&"
Secs",RIGHT(A1,2)&" secs")

Vaya con Dios,
Chuck, CABGx3


"Ade" wrote in message
...
Hi there
I'm an inexperienced excel user but have been given a task to present some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring the
data over but have been following the help files provided by office online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within a
cell in excel? Every time I try to format the cell it just gives me

nonsense
output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but can
anybody give me a clue?
Thanks in advance
Adrian




  #8   Report Post  
Posted to microsoft.public.excel.misc
Ade
 
Posts: n/a
Default format a six figure number to a time.

Thanks to all of you who replied, it's worked a treat.

All the best
Ade


"CLR" wrote in message
...
=LEFT(A1,2)&":"&MID(A1,3,2)&" and "&IF(MID(A1,5,1)="0",RIGHT(A1,1)&"
Secs",RIGHT(A1,2)&" secs")

Vaya con Dios,
Chuck, CABGx3


"Ade" wrote in message
...
Hi there
I'm an inexperienced excel user but have been given a task to present
some
raw data spewed out from a telephone exchange to a note pad file into an
excel spreadsheet. From the outset I've had difficulty in transferring
the
data over but have been following the help files provided by office
online
and have, up until now, muddled through. My latest problem has had me
tearing my hair out for the last four hours or so. Notepad gives me a six
digit figure eg 105306 which is the time mark for an event ie 10:53 and 6
secs. How can I use this 6 digit figure to generate a time format within
a
cell in excel? Every time I try to format the cell it just gives me

nonsense
output, something like 00:00:00.
I'm pretty sure it's a boneheaded question for some of you experts but
can
anybody give me a clue?
Thanks in advance
Adrian






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
Excel should format time down to the hundredth/sec. John Krick Excel Discussion (Misc queries) 3 November 28th 05 09:23 PM
" / " Changing Decimal number format to Fraction on Protected Cell laudie Excel Worksheet Functions 0 November 15th 05 01:12 AM
number format Ivan Excel Discussion (Misc queries) 2 October 14th 05 02:08 PM
entering numbers to display a time format Ian Williams/Eazygig Excel Discussion (Misc queries) 1 January 10th 05 11:57 AM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM


All times are GMT +1. The time now is 04:33 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"