View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Need help with dates

for each cell in selection
cell.value = Mid(cell,5,2) & "/" & right(cell,2) & "/" & Left(cell,4)
Next

You might need to format the cell as date as well.
You dates are ambiguous, so I don't know whether you are a mm/dd/yyyy or
dd/mm/yyyy kind of person.
--
Regards,
Tom Ogilvy

"Sethaholic" wrote
in message ...

Hi,

My worksheet extracts data from another source, but the dates are in a
weird format. For example, 20050607. This means 06/07/2005. I have
tried several ways to try to fix this number to look like a date, but I
can't seem to do it. How can I format numbers like 19990509 into a date
format like 05/09/1999? Please help!! Thanks in advance


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile:

http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=386236