Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Convert date to text without changing format dd/mm/yy

I have a bunch of dates, formated as mm/dd/yy. To export them to the program
I want to work on them with they need to be in text format.
If I do the format cellsnumber tabtext, it converts them to some long
string of digits along the lines of 39296, and so on.
How can I retain the mm/dd/yy format as text without hand typing each one?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Convert date to text without changing format dd/mm/yy

Select the cells you want to convert and run this short macro:

Sub converttter()
Dim s As String
For Each r In Selection
s = r.Text
r.Clear
r.NumberFormat = "@"
r.Value = s
Next
End Sub
--
Gary''s Student - gsnu200826


"Wayne Wells" wrote:

I have a bunch of dates, formated as mm/dd/yy. To export them to the program
I want to work on them with they need to be in text format.
If I do the format cellsnumber tabtext, it converts them to some long
string of digits along the lines of 39296, and so on.
How can I retain the mm/dd/yy format as text without hand typing each one?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Convert date to text without changing format dd/mm/yy

Use a helper column...

A1 = a true Excel date = 01/01/09

Enter this formula in B1:

=TEXT(A1,"mm/dd/yy")

Copy down as needed.

The formula will return the *TEXT* string 01/01/09

Then you can convert the formulas to constants...

Select the entire range of these formulas
Goto the menu EditCopy
Then, EditPaste SpecialValuesOK

--
Biff
Microsoft Excel MVP


"Wayne Wells" wrote in message
...
I have a bunch of dates, formated as mm/dd/yy. To export them to the
program
I want to work on them with they need to be in text format.
If I do the format cellsnumber tabtext, it converts them to some long
string of digits along the lines of 39296, and so on.
How can I retain the mm/dd/yy format as text without hand typing each one?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Convert date to text without changing format dd/mm/yy

I figured it out via an example in this section that was something along
the lines of =TEXT(A1,"mm/dd/yy")
Then did a paste specialvalues and that brings me to my next question. The
cells all are in the correct text format but each and every one has an error
that shows
text as two digit date. Whoops, I figured out how to turn that off also.
Thanks for the help.
"Gary''s Student" wrote:

Select the cells you want to convert and run this short macro:

Sub converttter()
Dim s As String
For Each r In Selection
s = r.Text
r.Clear
r.NumberFormat = "@"
r.Value = s
Next
End Sub
--
Gary''s Student - gsnu200826


"Wayne Wells" wrote:

I have a bunch of dates, formated as mm/dd/yy. To export them to the program
I want to work on them with they need to be in text format.
If I do the format cellsnumber tabtext, it converts them to some long
string of digits along the lines of 39296, and so on.
How can I retain the mm/dd/yy format as text without hand typing each one?

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
& in formula changing date format to text ? Steve Excel Worksheet Functions 5 May 14th 08 08:31 PM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
Changing text to date format CM[_2_] Excel Discussion (Misc queries) 2 March 14th 07 12:10 PM
changing text to date format mcamp Excel Worksheet Functions 8 February 8th 07 08:51 PM
Help: How do I convert a text date into a real date format japorms Excel Worksheet Functions 4 August 2nd 06 06:36 PM


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