Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
am[_2_] am[_2_] is offline
external usenet poster
 
Posts: 1
Default Merging rows (from a large number) by two

Hello,

I have a Microsoft Office Word 2007 table with two columns and many
rows. In both columns, I'd like to merge rows by two (i.e., rows 1 and
2 together, rows 3 and 4 together, rows 5 and 6...) Is there an easy
way to do this? Highlighting cells by two would take very long.

Many thanks in advance,

A.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Mark Tangard[_4_] Mark Tangard[_4_] is offline
external usenet poster
 
Posts: 10
Default Merging rows (from a large number) by two

Hi Andrea,

Word doesn't actually let you merge whole rows in one swoop, only cells.
This'll work, assuming the table is uniform (hasn't got any merged cells
already) and has an even number of rows. It also assumes you want the
cell pairs' content merged in a very ordinary way, with a pgph mark
separating them.

Sub MergeVerticalCellPairs()
Dim d As Document, t As Table, i As Long, j As Long
Set d = ActiveDocument
Set t = Selection.Tables(1)
For i = t.Rows.Count - 1 To 1 Step -2
For j = 1 To t.Columns.Count
d.Range(t.Cell(i, j).Range.Start, t.Cell(i + 1, j).Range.End).Select
Selection.Cells.Merge
Next j
Next i
End Sub

Hope this helps.

Mark Tangard
Word MVP 2001-2004



am wrote:
Hello,

I have a Microsoft Office Word 2007 table with two columns and many
rows. In both columns, I'd like to merge rows by two (i.e., rows 1 and
2 together, rows 3 and 4 together, rows 5 and 6...) Is there an easy
way to do this? Highlighting cells by two would take very long.

Many thanks in advance,

A.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
word hangs on formatting a large number of rows GS Formatting Long Documents 2 April 21st 09 06:50 AM
Merging multiple rows within column sumatradc Tables 2 April 25th 07 07:54 PM
how to determine the number of rows in a large Word table? bob g in essex ct Microsoft Word Help 5 November 20th 06 12:19 PM
mail merging multiple columns with varying number of rows troll_mage Mailmerge 1 November 10th 05 06:42 PM
Remove Rows from a Table after merging Kevin L Mailmerge 1 December 9th 04 11:13 AM


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

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"