View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
StuartBisset StuartBisset is offline
external usenet poster
 
Posts: 19
Default DateValue gets wrong date number


You should only run the Split on cells that are text and not values - otherwise, the value is a
date - a number - without \s.


Bernie

Apologies but I may have accidentally misled earlier. When I open the
CSV in notepad all the dates seem to be in the same format - dd/mm/
yyyy. When I grabbed the data from the CSV and put it into my new
workbook via the macro it appeared as though some were text and some
were numeric as I could see that some were formatting to the left
(like text would) and some were formatting to the right (like numeric
would). It is now clear that this was because the variant array was
treating the dates with days <= 12 as numbers and the dates with days
12 as text.


Any further ideas as to how I might fix this guddle?

Many Thanks

Stuart