View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Date to Text conversion

Select the range to fix first:

Dim myRng as range
dim myCell as range

set myrng = selection
myrng.numberformat = "@"
for each mycell in myrng.cells
mycell.value = mycell.text
next mycell

..text is what you see in the cell (after formatting). If the column is too
narrow, you could see ###'s and this will keep those ###'s--so be a little
careful.



Michael Koerner wrote:

I have a sheet with a two columns containing dates. Sometimes it is the full
date as an example 25-Jul-1936, or Jul-1936 or 1936 I would like to be able
to convert that to text and maintain the same face value. Is that possible
with some sort of macro?

--

Regards
Michael Koerner


--

Dave Peterson