Wednesday, June 9, 2010

Paste Word table to excel with line breaks

Scenario: You have a table in Word that you want to paste to Excel. However the Word table contains line or paragraph breaks, for example bullet lists within the cells. These cause the Word table rows to be slit over several rows in Excel.

Solution

  • Paste the Word table into a new Word document
  • Open “Search and replace”, search for ^p and replace with ;
  • The new lines will now replaced with a ; sign.
  • Copy the table and Paste into Excel
  • Open “Search and replace” in Excel, search for ; and replace with *Hold down Alt key and press 010” (ASCII for new line).
  • Done!

I did have som trouble with the search and replace in Exel. It did not insert a new, it inserted like three new lines for each ; . Changing to a different computer did help, so really don’t know what the problem was.