#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Number to time

Hi
An information system I work with outputs times as follows to a csv
file.

748 for 7:48
1236 for 12:36
1436 for 14:36
etc

It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Number to time

Assuming your "times" are in column A, put this formula in an adjacent
column:

=VALUE(LEFT(A1,LEN(A1)-2)&":"&RIGHT(A1,2)&":00")

Format the cell as Time using [h]:mm, then copy down the column.

Hope this helps.

Pete

On Mar 4, 10:37*pm, mikerobe wrote:
Hi
An information system I work with outputs times as follows to a csv
file.

748 for 7:48
1236 for 12:36
1436 for 14:36
*etc

It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Number to time

*Maybe* this:

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

Then format as TIME 13:30


--
Biff
Microsoft Excel MVP


"mikerobe" wrote in message
...
Hi
An information system I work with outputs times as follows to a csv
file.

748 for 7:48
1236 for 12:36
1436 for 14:36
etc

It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 80
Default Number to time ping T

T.. what does the "--" do in this formula. Seems to format the result to
the right! and also why is "\" needed in the format part.

"T. Valko" wrote in message
...
*Maybe* this:

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

Then format as TIME 13:30


--
Biff
Microsoft Excel MVP


"mikerobe" wrote in message
...
Hi
An information system I work with outputs times as follows to a csv
file.

748 for 7:48
1236 for 12:36
1436 for 14:36
etc

It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Number to time ping T

The TEXT function returns a text string.

A1 = 748

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

Returns 07:48 as a TEXT string. It's not a true Excel numeric time value.

The "--" coerces this text string to the true Excel numeric time value of
7:48 AM (or 7:48 h:mm).

The "\" is a "delimiter". It tells the TEXT function to "split" the string
748 into a format like this ##:## (or hh:mm)


--
Biff
Microsoft Excel MVP


"Meebers" wrote in message
...
T.. what does the "--" do in this formula. Seems to format the result to
the right! and also why is "\" needed in the format part.

"T. Valko" wrote in message
...
*Maybe* this:

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

Then format as TIME 13:30


--
Biff
Microsoft Excel MVP


"mikerobe" wrote in message
...
Hi
An information system I work with outputs times as follows to a csv
file.

748 for 7:48
1236 for 12:36
1436 for 14:36
etc

It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Number to time

On Mar 4, 10:50*pm, "T. Valko" wrote:
*Maybe* this:

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

Then format as TIME 13:30

--
Biff
Microsoft Excel MVP

"mikerobe" wrote in message

...



Hi
An information system I work with outputs times as follows to a csv
file.


748 for 7:48
1236 for 12:36
1436 for 14:36
etc


It leaves out the colon. How can I change the values to represent
times instead of numbers. I am thinking along the lines of a function
using RIGHT function but cannot get it to work any help is appreciated.- Hide quoted text -


- Show quoted text -


Thanks Biff this worked perfect, Petes solution worked also, two
different ways of doing the same thing, never came across Biffs way of
doing this before so will use this solution
Much appreciated
Eddie

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Number to time

You said you wanted a formula which included the RIGHT function, so I
gave you that. There are other ways still, but Biff's is probably
shortest.

Thanks for feeding back.

Pete

On Mar 5, 11:33*am, mikerobe wrote:

Thanks Biff this worked perfect, Petes solution worked also, two
different ways of doing the same thing, never came across Biffs way of
doing this before so will use this solution
Much appreciated
Eddie

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Number to time

On Mar 5, 11:38*am, Pete_UK wrote:
You said you wanted a formula which included the RIGHT function, so I
gave you that. There are other ways still, but Biff's is probably
shortest.

Thanks for feeding back.

Pete

On Mar 5, 11:33*am, mikerobe wrote:





Thanks Biff this worked perfect, Petes solution worked also, two
different ways of doing the same thing, never came across Biffs way of
doing this before so will use this solution
Much appreciated
Eddie- Hide quoted text -


- Show quoted text -


Thanks Pete, I would have been messing about with this for a long
while without yours and Biffs help.
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Number to time

You're welcome, Mike.

Pete

On Mar 5, 11:41*am, mikerobe wrote:

Thanks Pete, I would have been messing about with this for a long
while without yours and Biffs help

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Number to time

Thanks Biff this worked perfect, Petes solution worked also,
two different ways of doing the same thing, never came across
Biffs way of doing this before so will use this solution


While it doesn't harm anything, Biff's formula has an extraneous set of
parentheses in it. This version of it will work just as well...

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

Rick



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Number to time

Even shorter, Rick !! <bg

Pete

On Mar 5, 7:03*pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Thanks Biff this worked perfect, Petes solution worked also,
two different ways of doing the same thing, never came across
Biffs way of doing this before so will use this solution


While it doesn't harm anything, Biff's formula has an extraneous set of
parentheses in it. This version of it will work just as well...

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

Rick


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
number to time Stan Halls Excel Worksheet Functions 6 May 4th 07 01:56 AM
time into a number Polochilde Excel Discussion (Misc queries) 6 March 5th 07 04:12 AM
Every time i put a number with period it becomes a date and time excelSOS Excel Discussion (Misc queries) 7 March 7th 06 12:20 AM
Time as number Howard Excel Discussion (Misc queries) 4 June 23rd 05 09:12 PM
Time to number Steved Excel Worksheet Functions 3 April 27th 05 08:00 AM


All times are GMT +1. The time now is 12:44 PM.

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

About Us

"It's about Microsoft Excel"