ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pasting from Word Table (https://www.excelbanter.com/excel-discussion-misc-queries/135953-pasting-word-table.html)

Eric

Pasting from Word Table
 
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!

Stout

Pasting from Word Table
 
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 Editpaste specialvalues.

"Eric" wrote:

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!


Eric

Pasting from Word Table
 
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).

"Stout" wrote:

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 Editpaste specialvalues.



Dave Peterson

Pasting from Word Table
 
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).

Eric wrote:

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!


--

Dave Peterson


All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com