I have 4 columns of text-dates that I need to convert to excel dates, mainframe type xml exports.
I know using the Text to Columns works for me but I can only do 1 column at a time.
I also recorded it as a macro.
Question: can I do all 4 columns (R:U) using this macro?
I've also tried this Macro which works too but only on the 1 column that is selected.
Thanks,
tav
I know using the Text to Columns works for me but I can only do 1 column at a time.
I also recorded it as a macro.
Question: can I do all 4 columns (R:U) using this macro?
Code:
Columns("S:S").Select
Selection.TextToColumns Destination:=Range("S1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 3), TrailingMinusNumbers:=True
I've also tried this Macro which works too but only on the 1 column that is selected.
Code:
Sub MakeTrueDate()
'Converts Text Dates(US) to dates(US), Tom Ogilvy, 2001-03-24 programming
Dim rng As Range
Set rng = Intersect(ActiveCell.EntireColumn, _
ActiveSheet.UsedRange) 'next assume first row is a header
Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1)
rng.NumberFormat = "mm/dd/yyyy"
rng.Value = rng.Value
End Sub
tav