text to columns
I recently exported some emails from Outlook into an Excel file. I wanted to get the contents into a file so that I could use the address details that had been in the emails.
Outlook exports the email body into one cell and adds carriage returns to the text. I needed to convert the carriage returns and “box” characters into something that I use to to Delimit the text.
This is what I did. I created the following VBA routine. The first line takes out the carriage returns and replaces them with a semi colon. The second line replaces the box characters with a tilde.
Sub fixme()
ActiveSheet.UsedRange.Replace what:=Chr(10), replacement:=";" 'this is the carriage return
ActiveSheet.UsedRange.Replace what:=Chr(13), replacement:="~" 'this is the box character
End Sub
I can then highlight the text and convert it to columns using the Text to Columns feature in Excel.






[...] Original post by David [...]