View Single Post
  #1   Report Post  
Nortos
 
Posts: n/a
Default Macro to convert text to date

I've been trying to record a Macro so that I can change text in columns to a
date format, I've used Text to columns to do this which works well outside a
Macro, but I have 20 columns to do on a weekly basis so would like to
automate it in a macro.

The imported file is in the following format "04/04/2005 10:17:51"
dd/mm/yyyy hh:mm:ss

I recorded a Marco, but it does not work in cells with a date 13+ for
example 13/04/2005 10:17:51 remains in text format?

Can any one let me know what I'm doing wrong or suggest VB code to solve this.

My knowledge of VB is poor, so go easy on me!