# Problems with tables in Word

**URL:** <https://boards.straightdope.com/t/problems-with-tables-in-word/401462>\
**Category:** Factual Questions\
**Created:** [April 24, 2007, 3:26pm UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462 "2007-04-24T15:26:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pushkin](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@Pushkin](https://boards.straightdope.com/u/Pushkin)\
**Post date:** [April 24, 2007, 3:26pm UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/1 "2007-04-24T15:26:21Z")

</div>

I have a word file, with a table of addresses. When I try to paste the table into Excel, the cells split into twos and threes, frustrating my efforts to run a merge from it. Is there any way to paste it into Excel and keep the table shape? It would be a pain to copy and paste 292 times from the Word table to Word labels :smack:

---

<div class="post-metadata">

**Author:** ![crazyjoe](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@crazyjoe](https://boards.straightdope.com/u/crazyjoe)\
**Post date:** [April 24, 2007, 4:12pm UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/2 "2007-04-24T16:12:32Z")

</div>

Well, it depends. If you have carriage returns in your Word Table, excel will not know what to do with those, since it normally sees a CR as the stopping point of a cell. I assume you have a “table” of address labels, right? Each label is formatted like:  
Name  
Street  
City, State Zip

right?

There’s not going to be an easy way for you to get that into Excel without some data manipulation. In Excel, what you will need to do is format it like this (with | indicating a new cell)  
Name | Street | City | State | Zip

Also, they will need to be horizontal, as opposed to vertical (ie each address should make up a row, not a column.

What I would do it copy one column of your label table into excel. Create a macro using “relative references” that moves the fields around, and keep running it until all the data from the first column of your labels is converted. Then do the next column, etc etc.

It’s still going to be more work than a simple copy/paste, but it won’t be 292 copy and paste steps.

---

<div class="post-metadata">

**Author:** ![Pushkin](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@Pushkin](https://boards.straightdope.com/u/Pushkin)\
**Post date:** [April 24, 2007, 6:44pm UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/3 "2007-04-24T18:44:27Z")

</div>

The way the data appears is in a table 3 columns wide by many deep. In the right hand cell, there are 3-4 rows of address, that’s the problem as I see it.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [April 25, 2007, 1:53am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/4 "2007-04-25T01:53:27Z")

</div>

Pushkin, can you post an excerpt of that file somewhere so we can take a look?

If the data is confidential or sensitive, could you create a Word doc with made-up examples that use the same format?

You can email it to me ([cannotreply@gmail.com](mailto:cannotreply@gmail.com)) if you can’t post it anywhere.

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [April 25, 2007, 2:35am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/5 "2007-04-25T02:35:34Z")

</div>

[QUOTE=Pushkin]  
In the right hand cell, there are 3-4 rows of address, that’s the problem as I see it.  
[/QUOTE]  
Yeah, you got it. More specifically, it’s the line breaks (paragraph marks, if you prefer) that are doing it.

I tried the following. It didn’t work, but maybe it will give someone some ideas.

First, while still in Word, do a Find-and-Replace, looking for ^p (that’s a carat [upper-case 6] followed by the letter “p”) and replacing with some other character (I usually use a tilde, the ~ in the top left corner of the keyboard). This will change all your paragraph marks to tildes, compressing those addresses into a single row each. Now you can copy your table to Excel, and you’ll have the correct number of rows. The problem is that your addresses will be messed up, because Excel’s find-and-replace can’t handle special characters. Oh well, sorry. ☹

---

<div class="post-metadata">

**Author:** ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)\
**Post date:** [April 25, 2007, 4:20am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/6 "2007-04-25T04:20:38Z")

</div>

Amazing how difficult this is, maybe Bill Gates should grab his Excel people and take them down the hall and introduce them to his Word people.

Keeve, picking up where you left off…

In Word do the search and replace with the tilde. Paste in Excel and run the following macro against the selected range:

```auto

Sub Zap()
Dim C As Range, CellText As String, x As Integer
For Each C In Selection
    CellText = C.Text
    x = InStr(CellText, "~")
    Do While x <> 0
        CellText = Mid(CellText, 1, x - 1) & vbLf & Mid(CellText, x + 1)
        x = InStr(CellText, "~")
    Loop
    C.Value = CellText
Next
End Sub

```

---

<div class="post-metadata">

**Author:** ![Pushkin](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@Pushkin](https://boards.straightdope.com/u/Pushkin)\
**Post date:** [April 25, 2007, 7:55am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/7 "2007-04-25T07:55:21Z")

</div>

[QUOTE=Reply]  
Pushkin, can you post an excerpt of that file somewhere so we can take a look?

If the data is confidential or sensitive, could you create a Word doc with made-up examples that use the same format?

You can email it to me ([cannotreply@gmail.com](mailto:cannotreply@gmail.com)) if you can’t post it anywhere.  
[/QUOTE]

Basically I have my addresses in cells in a column like so;

David McBlah,  
15 Blah Gardens,  
Blah,  
Blah Postcode

And sometimes there’s no “Blah and Postcode”, so I’ve a mixture of three and four line addresses.

Typical academics, they give me this at the last minute with some fracked up formatting :rolleyes: As soon as I suggested inputting addresses into Excel to make it easy for me to run a merge, I was told they were already in a Word table :smack:

I’ll try what’s been suggested, thanks all.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [April 25, 2007, 9:48am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/8 "2007-04-25T09:48:24Z")

</div>

Pushkin, sorry I wasn’t clear… I asked for an excerpt in order to see if some sort of data manipulation could be done with a third-party program, or if a macro could be made to programatically and automatically do the work for ya. Something as close to the actual data as possible would be best, because the inconsistencies are the most important part.

K364 already made you a macro, I see. Does that work?

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [April 25, 2007, 10:05am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/9 "2007-04-25T10:05:06Z")

</div>

[QUOTE=Pushkin]  
Basically I have my addresses in cells in a column like so;

David McBlah,  
15 Blah Gardens,  
Blah,  
Blah Postcode

And sometimes there’s no “Blah and Postcode”, so I’ve a mixture of three and four line addresses.  
[/QUOTE]

You mean the table only has one column, and the data is separated by rows? Like [this example](http://www.zxcvv.com/pushkin.html)?

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [April 25, 2007, 10:45am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/10 "2007-04-25T10:45:10Z")

</div>

[QUOTE=Reply]  
You mean the table only has one column, and the data is separated by rows? Like [this example](http://www.zxcvv.com/pushkin.html)?  
[/QUOTE]  
Close. Based on post #3, I’d say that he has three columns, the third of which is exactly like you have it, but the first two are normal with no line breaks.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [April 25, 2007, 10:48am UTC](https://boards.straightdope.com/t/problems-with-tables-in-word/401462/11 "2007-04-25T10:48:31Z")

</div>

On closer look, actually, I think the suggestions here already suffice. Oops 🙂
