View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
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?