I'm having serious issues with Excel autoformatting my dates. I am located in Canada, and I have the locale settings for windows set to the dd/mm/yyyy format. Every day I download an excel file containing responses to a survey. I run a macro that involves merging these downloaded workbooks into a summary workbook, and generating a summary report. The summary should only be for the last week, but unfortunately the file I download can only be all responses.
The issue I'm having is with the timestamp. Each response is timestamped and the format is dd/mm/yyyy HH:MM:SS (hours, minutes, seconds).
I figured that to sort properly by date I should split this column so I use
to split it into two columns with the date in column A and the timestamp in column B.
But when this happens, excel likes to mess with my brain. For instance, 31/08/2014 08:00:00 separates properly, as Excel does not recognize 31/08/2014 as a valid date. But September 1st formats to 2/9/2014, which Excel then recognizes as January 9th. September 2 becomes February 9th and so on.
I need to figure out a way to preserve either the date in the raw format (which at least then I can use some complicated IF formula or something) or format all dates properly in the DD/MM/YYYY format, or any consistent format.
I am so frustrated with this ANY help would be much appreciated.
Thanks
The issue I'm having is with the timestamp. Each response is timestamped and the format is dd/mm/yyyy HH:MM:SS (hours, minutes, seconds).
I figured that to sort properly by date I should split this column so I use
Code:
.Columns("B:B").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
.Range("A:A").TextToColumns Destination:=.Range("A:A"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
to split it into two columns with the date in column A and the timestamp in column B.
But when this happens, excel likes to mess with my brain. For instance, 31/08/2014 08:00:00 separates properly, as Excel does not recognize 31/08/2014 as a valid date. But September 1st formats to 2/9/2014, which Excel then recognizes as January 9th. September 2 becomes February 9th and so on.
I need to figure out a way to preserve either the date in the raw format (which at least then I can use some complicated IF formula or something) or format all dates properly in the DD/MM/YYYY format, or any consistent format.
I am so frustrated with this ANY help would be much appreciated.
Thanks