A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merge columns not rows



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2008, 04:08 PM posted to microsoft.public.word.tables
Microchip
external usenet poster
 
Posts: 4
Default Merge columns not rows

I have a large table (160 pages) where I want to combine four (address)
columns into one. Word doed exactly that one cell containing 4 columns and
160 rows of data. How can I merge the four columns in each row without doing
it row by row?

Thanks
  #2  
Old December 2nd, 2008, 06:37 PM posted to microsoft.public.word.tables
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default Merge columns not rows

This is one instance where the Eraser tool on the Tables & Borders toolbar
really comes in handy. Use it to "erase" the boundaries between the cells.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Microchip" wrote in message
...
I have a large table (160 pages) where I want to combine four (address)
columns into one. Word doed exactly that one cell containing 4 columns
and
160 rows of data. How can I merge the four columns in each row without
doing
it row by row?

Thanks



  #3  
Old December 3rd, 2008, 06:19 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Merge columns not rows

Use a macro containing the following code:

Dim i As Long, j As Long
Dim element As Range
Dim address As String
With Selection.Tables(1)
For i = 1 To .Rows.Count
address = ""
For j = 1 To 3
Set element = .Cell(i, j).Range
element.End = element.End - 1
address = address & element.Text & vbCr
Next j
Set element = .Cell(i, 4).Range
element.End = element.End - 1
address = address & vbCr
.Cell(i, 1).Range.Text = address
Next i
For i = 4 To 3 Step -1
.Columns(i).Delete
End With

Or use a Directory type mail merge with your existing table as the
datasource and in the mail merge main document, insert a one cell table and
into that cell, insert the field names of the 4 columns in the configuration
that you want and then execute the merge to a new document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Microchip" wrote in message
...
I have a large table (160 pages) where I want to combine four (address)
columns into one. Word doed exactly that one cell containing 4 columns
and
160 rows of data. How can I merge the four columns in each row without
doing
it row by row?

Thanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.