I've built a Text-To-Columns function into my macro - it simply divides date and time stored in one column into two other columns, one for date and one for time.
Strangely, when I perform this function directly in Excel, I receive the desired output: date + time in 24h format (as originally presented), but when I run exactly the same procedure recorded as a macro the output is: date + time in 12h format. An additional third column is created with AM/PM mark (in fact, data in a column that is supposed to stay unchanged is overwritten) - this column is not created when executing this function manually.
Here's the code:
Columns("G:G").Select
Selection.TextToColumns Destination:=Range("A2"), 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
Would you please advise me what to do in order to keep 24h time format?