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  

Merging Cells



 
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2006, 09:14 PM posted to microsoft.public.word.tables
Michael
external usenet poster
 
Posts: 57
Default Merging Cells

Hi Folks - I have a large table column like this:

Text
Blank
Text
Blank

I need to merge every two rows. So, now I have 100 rows, the end result will
be 50 rows. I know I can do this manually, but I have about 20 tables with
100 rows. Any ideas?

Thanks,

Michael



  #2  
Old August 5th, 2006, 10:17 AM posted to microsoft.public.word.tables
Cindy M -WordMVP-
external usenet poster
 
Posts: 312
Default Merging Cells

Hi Michael,

have a large table column like this:

Text
Blank
Text
Blank

I need to merge every two rows. So, now I have 100 rows, the end result will
be 50 rows. I know I can do this manually, but I have about 20 tables with
100 rows. Any ideas?

See if a macro like this helps (only tested on a smallish table)

Sub MergeEverySecondCell()
Dim tbl As Word.Table
Dim counter As Long
Dim col As Word.Column
Dim celLower As Word.Cell
Dim celUpper As Word.Cell

Set tbl = ActiveDocument.Tables(1)
counter = 1
Set col = tbl.Columns(1)
Do While counter col.Cells.Count
Set celLower = col.Cells(counter)
counter = counter + 1
Set celUpper = col.Cells(counter)
celLower.Merge celUpper
Loop
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging and re-splitting cells fthynne Tables 0 July 5th, 2006 04:03 PM
Merging of cells within a table dave15 Tables 1 July 3rd, 2006 11:35 AM
Merging info from 5 cells to 1 Clare General Discussion 7 March 22nd, 2006 10:05 PM
Merging Cells and autofit Shaz General Discussion 3 February 16th, 2006 04:55 AM
Problem with Merging Data Cells with Empty Cells Te_Diddy General Discussion 3 August 9th, 2004 10:33 AM


All times are GMT +1. The time now is 10:40 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.