Sub CopyTextMacro()
With Sheets("Sheet1")
.Columns("J").NumberFormat = "MM/DD/YYYY"
.Columns("J").TextToColumns Destination:=.Columns("J"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, DecimalSeparator:="."
End With End Sub
Running this snippet on my excel document somehow erases the next column over in this case ‘K’ Not sure how to fix or why this is happening. It correctly formats the ‘J’ column to date but then I can’t format the next column as it deletes column ‘K’ and then I get a parser error in Visual Basic. K used to have the header ‘PullRequestDate’ before running snippet.