#1   Report Post  
Mike Busch
 
Posts: n/a
Default Dat Formatting

I received a large ASCII format document that I imported into Excel. The date
appears as 19500323. Is there anyway to format this to read 03/23/1950.
thanks in advance.
  #2   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Mike

you'll probably need an extra column. Assuming the date is in cell A1, the
formula would be:

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

or, simply:

=MID(A1,5,2)&"/"&RIGHT(A1,2)&"/"&LEFT(A1,4)

Note that the first formula returns a date *value* which is formatted as a
date. The second returns a text string that *looks* like a date. So, the
first gives the number 18345 which is then formatted as a date to give
03/23/1950.

Regards

Trevor


"Mike Busch" wrote in message
...
I received a large ASCII format document that I imported into Excel. The
date
appears as 19500323. Is there anyway to format this to read 03/23/1950.
thanks in advance.



  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Mike

DataText to ColumnsNextNext. Column Data FormatDateYMD and Finish.

Your copied sample came out as desired.


Gord Dibben Excel MVP

On Fri, 18 Feb 2005 15:21:02 -0800, "Mike Busch"
wrote:

I received a large ASCII format document that I imported into Excel. The date
appears as 19500323. Is there anyway to format this to read 03/23/1950.
thanks in advance.


  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

One column at a time:

Select that column
Data|text to columns
choose YMD as the field type
Format|cells|number tab
and give it the format you like best.



Mike Busch wrote:

I received a large ASCII format document that I imported into Excel. The date
appears as 19500323. Is there anyway to format this to read 03/23/1950.
thanks in advance.


--

Dave Peterson
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

Ps. If you're importing this file (like File|open), you can choose YMD for that
field and save a little bit of time.

Mike Busch wrote:

I received a large ASCII format document that I imported into Excel. The date
appears as 19500323. Is there anyway to format this to read 03/23/1950.
thanks in advance.


--

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
Conditional Formatting in Excel Help Please..... Willie T Excel Discussion (Misc queries) 4 February 9th 05 02:28 PM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM
How do I use conditional formatting for multiple rows? Jim Johnson Excel Worksheet Functions 1 October 30th 04 03:36 AM


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