#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default editing numbers

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default editing numbers

Make sure you don't have text. check for signgle quote att beginning of time.

"stremetzky" wrote:

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default editing numbers

I think you'll find that it will default to text, without the need for a
single quote. A number of the normal tricks for converting to time won't
work.

If all else fails, try
=LEFT(A1,FIND(":",A1)-1)/24+RIGHT(A1,LEN(A1)-FIND(":",A1))/24/60
(or, if the number of characters is fixed, =LEFT(A1,3)/24+RIGHT(A1,2)/24/60)
and format as [h]:mm
--
David Biddulph

"Joel" wrote in message
...
Make sure you don't have text. check for signgle quote att beginning of
time.

"stremetzky" wrote:

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default editing numbers

I think they want time, and got text instead. They need to convert from text
tto time.

"David Biddulph" wrote:

I think you'll find that it will default to text, without the need for a
single quote. A number of the normal tricks for converting to time won't
work.

If all else fails, try
=LEFT(A1,FIND(":",A1)-1)/24+RIGHT(A1,LEN(A1)-FIND(":",A1))/24/60
(or, if the number of characters is fixed, =LEFT(A1,3)/24+RIGHT(A1,2)/24/60)
and format as [h]:mm
--
David Biddulph

"Joel" wrote in message
...
Make sure you don't have text. check for signgle quote att beginning of
time.

"stremetzky" wrote:

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default editing numbers

Can you suggest an easier way of converting 029:15 from text to time, Joel?
I feel there ought to be an easier way, but the usual ways don't seem to
work in this case.
--
David Biddulph

"Joel" wrote in message
...
I think they want time, and got text instead. They need to convert from
text
tto time.


"David Biddulph" wrote:

I think you'll find that it will default to text, without the need for a
single quote. A number of the normal tricks for converting to time won't
work.

If all else fails, try
=LEFT(A1,FIND(":",A1)-1)/24+RIGHT(A1,LEN(A1)-FIND(":",A1))/24/60
(or, if the number of characters is fixed,
=LEFT(A1,3)/24+RIGHT(A1,2)/24/60)
and format as [h]:mm
--
David Biddulph

"Joel" wrote in message
...
Make sure you don't have text. check for signgle quote att beginning
of
time.

"stremetzky" wrote:

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default editing numbers

Not sure if this is any better. the real problem is sttripping off leading
zeros

=TIMEVALUE(trimchar(E16,"0"))

wrote my own function to strip off leading zeroes

Function trimchar(MyString As String, MyChar As String) As String

trimchar = MyString
Do While Left(trimchar, 1) = MyChar
trimchar = Mid(trimchar, 2)
Loop
End Function



"David Biddulph" wrote:

Can you suggest an easier way of converting 029:15 from text to time, Joel?
I feel there ought to be an easier way, but the usual ways don't seem to
work in this case.
--
David Biddulph

"Joel" wrote in message
...
I think they want time, and got text instead. They need to convert from
text
tto time.


"David Biddulph" wrote:

I think you'll find that it will default to text, without the need for a
single quote. A number of the normal tricks for converting to time won't
work.

If all else fails, try
=LEFT(A1,FIND(":",A1)-1)/24+RIGHT(A1,LEN(A1)-FIND(":",A1))/24/60
(or, if the number of characters is fixed,
=LEFT(A1,3)/24+RIGHT(A1,2)/24/60)
and format as [h]:mm
--
David Biddulph

"Joel" wrote in message
...
Make sure you don't have text. check for signgle quote att beginning
of
time.

"stremetzky" wrote:

I have imorted values from another program. Imported values are in
000:00 form (000 for hours and 00 for minutes). If there is less than
100 hours the value is still not treated as [h]:mm. For example:

029:15

How can I erase the first one or two zeros??

stremetzky








  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default editing numbers

"David Biddulph" <groups [at] biddulph.org.uk wrote...
Can you suggest an easier way of converting 029:15 from text to
time, Joel?
I feel there ought to be an easier way, but the usual ways don't
seem to work in this case.

....

=LOOKUP(1E6,--MID(A1,{3;2;1},16))

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default editing numbers

I have got solution for it:

=LEFT(A1)/24*100+RIGHT(A1,5)

Thank you for help anyway,

stremetzky

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
Editing out numbers in a cell Aversin Excel Discussion (Misc queries) 5 April 13th 06 09:29 PM
Min Max Editing bkj8890 Excel Worksheet Functions 1 March 27th 06 08:52 PM
Min Max Editing bkj8890 Excel Discussion (Misc queries) 3 March 27th 06 05:45 PM
editing a name TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 October 18th 05 11:33 AM
Editing the name box TDS570 New Users to Excel 2 August 7th 05 06:12 PM


All times are GMT +1. The time now is 06:19 AM.

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"