Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-25-2016, 03:35 PM
macropod's Avatar
macropod macropod is online now Merge table cells across columns but skip if column don't exist Windows 7 64bit Merge table cells across columns but skip if column don't exist Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub CellMerge()
Application.ScreenUpdating = False
Dim Tbl As Table, Rng As Range
For Each Tbl In ActiveDocument.Tables
  With Tbl.Rows(1)
    If .Cells.Count > 2 Then
      Set Rng = .Range
      Rng.Start = .Cells(2).Range.Start
      Rng.Cells.Merge
    End If
  End With
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
merge, skip columns, table

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge table cells across columns but skip if column don't exist How do I skip automatic Numbering on merged cells in my table? Snaybot Word 1 09-28-2015 11:27 PM
Merge table cells across columns but skip if column don't exist Column text flow with table across the columns ravenns Word 3 07-11-2013 11:29 PM
How to merge two columns & replace contents of cells conditionally? mag Excel 3 10-24-2012 01:07 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft