Pasting from Word Table

E

Eric

I'm trying to copy a Word table into Excel. My table contains address labels
with name, address, city/state/zip on three lines (separated by a line break)
within each cell of the Word table.

When copying into Excel, the address data pastes over as three separate
cells. Any (non-Visual Basic) ideas on how I can get it to all paste into one
cell (as if typed into the cell with an alt-Enter after every line)?

TIA!
 
S

Stout

not sure about the "alt-enter" but you can get them in one cell by:

Assuming the address pastes in A1, B1,C1.

In D1, type "=a1&b1&c1" for spaces in between the address cells try =A2&"
"&B2&" "&C2

Then copy D1, go to Edit>paste special>values.
 
E

Eric

Thanks for the suggestion. That puts them all in one cell, but it doesn't
address the issue of then wanting the data to look like a formatted address
label within that cell.

I figured out a workaround:

1) Replace the line breaks in the Word document with a unique character
string. Then when that's pasted into Excel, the lines don't break and
everything stays in one cell with the string temporarily substituting for the
line break.

2) Then do a find/replace, finding the string and replacing it with a Ctrl-j
(which become your line breaks within the cell, or the equivalent of typing
Alt-Enter).
 
D

Dave Peterson

Saved from a previous post:

If your cells in your word table contain paragraph mark or linebreak characters,
then excel will bring them over as separate cells.

One way around it is to convert those paragraph marks & linebreaks to unique
characters, then copy|paste and then convert them back to linefeeds.

I like this technique (inside a copy of the word file):
Select your table.
Edit|replace|Special (show More if required)
Find what: (paragraph mark under Special button)
replace with: $$$$$ (if $$$$$ doesn't appear in the table)
replace all

Same thing with Manual Line break (from under Special).

Now copy the table into Excel.

Edit|Replace
Replace what: $$$$$
Replace with: ctrl-j
replace all.

You may have to use Format|cells|Alignment tab|check wrap text

Don't forget to close the word document without saving (or hit undo as many
times as necessary).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top