merge columns in a table

J

Jules

Is there a way to merge only the columns in a table without changing the rows?

I have a table that consists of 3 columns and a number of rows. For each
row I want to merge the 2nd and 3rd columns. The only thing I can find is
merge cells which merges the highlighted columns and rows into one cell.

If there is a way to merge only the columns, please let me know.
thanks,
 
G

Graham Mayor

A macro should do it

Sub MergeCols2_3()
Dim cTable As Table
Dim oRng As Range
Set cTable = ActiveDocument.Tables(1)
For i = 1 To cTable.Rows.Count
Set oRng = ActiveDocument.Range _
(start:=cTable.Cell(i, 2).Range.start, _
End:=cTable.Cell(i, 3).Range.End)
oRng.Cells.Merge
Next i
End Sub
http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter A

A macro should do it

Sub MergeCols2_3()
Dim cTable As Table
Dim oRng As Range
Set cTable = ActiveDocument.Tables(1)
For i = 1 To cTable.Rows.Count
Set oRng = ActiveDocument.Range _
(start:=cTable.Cell(i, 2).Range.start, _
End:=cTable.Cell(i, 3).Range.End)
oRng.Cells.Merge
Next i
End Sub
http://www.gmayor.com/installing_macro.htm

Or, if the table does not have too many rows, it might be easier to
merge cells for each row.
 
S

Suzanne S. Barnhill

This is one of the few cases where the drawing tools on the Tables and
Borders toolbar come in handy. I don't advise drawing tables with the
pencil, but you can use the eraser to erase the boundary between columns
without combining the rows. This requires a little trial and error, but it's
the only way I know of (short of a macro) to do this in recent versions of
Word.
 
J

Jules

Thanks everyone. Went with Suzanne's eraser idea as this seems to suit our
purposes most. Wow, what a handy little tool. Thank you.
 
S

Suzanne S. Barnhill

Thank goodness for it, too. I don't know what the developers were thinking
when they changed the behavior of merging columns to merge them all into one
big cell. Too much Mountain Dew, I guess (or not enough).
 

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