Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Cell Format from General

=TIME(INT(A1/100),MOD(A1,100),0)

Next time, try to enter the data as 07:02, not as 0702.
--
David Biddulph

"S.C" wrote in message
...
I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00
AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Cell Format from General

It is because you have the times with out any delimiter so excel thinks you
are talking about days from 1/1/1900 so for 0702 you will have 02/12/1901
00:00:00 shown in the formula bar (ie 702 days from 1/1/1900).
I don't think you will be able to change this by formating the cell but
could fake it by putting =LEFT(A1,2) & ":" & RIGHT(A1,2) in a cell if you
have the 'time' you want in cell A1. Cell A1 would have to be formated as
text if you have any times starting with a zero.

hope this helps
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"S.C" wrote:

I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00 AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KL KL is offline
external usenet poster
 
Posts: 201
Default Cell Format from General

=--TEXT(A1,"00\:00")
and format as time

--
KL
[MVP - Microsoft Excel]
RU: http://www.mvps.ru/Program/Default.aspx
ES: http://mvp.support.microsoft.com/?LN=es-es
EN: http://mvp.support.microsoft.com/?LN=en-us
Profile: https://mvp.support.microsoft.com/pr...A-9E6C73C09A36


"David Biddulph" <groups [at] biddulph.org.uk wrote in message ...
=TIME(INT(A1/100),MOD(A1,100),0)

Next time, try to enter the data as 07:02, not as 0702.
--
David Biddulph

"S.C" wrote in message
...
I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00
AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S.C S.C is offline
external usenet poster
 
Posts: 6
Default Cell Format from General

I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00 AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Cell Format from General

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


"S.C" wrote:

I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00 AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S.C S.C is offline
external usenet poster
 
Posts: 6
Default Cell Format from General

The data I get I have no control over how it is exported to me, since it is
in a word document makes it a pain.

Thanks for all of the suggestions .... they work and have cut my time in
completing my task

Thanks again



"S.C" wrote in message
...
I have several rows of data that were exported into a word document. I cut
and paste the data into a notepad document and save as text. I then import
the txt into a excel workbook.

My problem is that I have several columns of "times" (0702, 1340, 2250).
When I try to change the cell formatting too "time" it shows as 12 00 00

AM

Is there a way to format the cell and keep the actual time data?

Thanks in advance for any assistance.

Steve




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
Cell changes from General format to Scientific flish Excel Worksheet Functions 9 January 17th 07 03:14 PM
Converting data in General Format cell to a number PE Excel Discussion (Misc queries) 3 October 26th 06 11:58 AM
Format: General - Text - General iturnrocks Excel Worksheet Functions 3 August 11th 06 04:47 PM
How to stop a general format cell Gaufres Excel Worksheet Functions 1 April 21st 06 06:57 AM
Change CSV-load cell format from GENERAL to TEXT for numbers? Morena Chris Matthews Excel Discussion (Misc queries) 1 October 14th 05 05:23 PM


All times are GMT +1. The time now is 10:59 AM.

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"