Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2013, 12:15 PM
james1979uk james1979uk is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 64bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 64bit
Novice
Merge only the text in a table and keep the 2 original colums of a table
 
Join Date: Dec 2013
Posts: 4
james1979uk is on a distinguished road
Default Merge only the text in a table and keep the 2 original colums of a table

I need to merge only the text that is inside 2 different columns in a Word 2010 table.



The only merge option i can see actually merges say 2 columns into 1 column, but I only need to merge the contents and do not wish to lose one of the columns.

I hope this makes sense and is something that can be done as it seems fairly easy but I can't figure it out.

Any help or advice will be appreciated.

James
Reply With Quote
  #2  
Old 12-08-2013, 01:18 PM
macropod's Avatar
macropod macropod is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 32bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

You can merge the cells on just one row, which means your two columns become one on just that row; or you can drag the text from one column to the other. The dragged content will be inserted at wherever you stop the insertion point.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-08-2013, 01:26 PM
james1979uk james1979uk is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 64bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 64bit
Novice
Merge only the text in a table and keep the 2 original colums of a table
 
Join Date: Dec 2013
Posts: 4
james1979uk is on a distinguished road
Default

Thanks for your help Paul. The drag option is what I'm looking for as I need to keep both columns after any text has been moved.

Is there any way of automating this or is there any software that is already in the market in the form of an add-in? If not would a macro be able to do this?

I need to be able to move the text from column A to column B sometimes several hundred times per document so the drag and drop option although works, will be extremely time consuming and tedious.

James
Reply With Quote
  #4  
Old 12-08-2013, 03:45 PM
macropod's Avatar
macropod macropod is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 32bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Whilst it might be possible to automate the process with a macro, the difficulty of doing so depends on the table structure for each table that is to be processed, especially if only some of the tables are to be processed and/or you need to transfer the data from different columns in different tables.

In some respects, the simplest approach may be to merge the cells horizontally, then split them horizontally again. And a macro could certainly be written for that part - provided the column widths within the table are consistent.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 12-09-2013, 01:28 PM
james1979uk james1979uk is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 64bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 64bit
Novice
Merge only the text in a table and keep the 2 original colums of a table
 
Join Date: Dec 2013
Posts: 4
james1979uk is on a distinguished road
Default

ok thanks Paul.

If anyone else out there can think of any other ways please let me know.
Reply With Quote
  #6  
Old 12-15-2013, 05:48 PM
macropod's Avatar
macropod macropod is offline Merge only the text in a table and keep the 2 original colums of a table Windows 7 32bit Merge only the text in a table and keep the 2 original colums of a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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 the following. It works with a range of selected cells.
Code:
Sub CellXfer()
Application.ScreenUpdating = False
Dim i As Long, RngTbl As Range, RngCell As Range
Set RngTbl = Selection.Range
On Error Resume Next
With RngTbl
  If .Information(wdWithInTable) = True Then
    For i = 1 To .Cells.Count Step 2
      If .Cells(i).Row.Index = .Cells(i + 1).Row.Index Then
        Set RngCell = .Cells(i + 1).Range
        With RngCell
          .End = .End - 1
          .Cut
        End With
        Set RngCell = .Cells(i).Range
        With RngCell
          .End = .End - 1
          If Len(.Text) = 0 Then
            .Paste
          ElseIf .Characters.Last = vbCr Then
            .Collapse wdCollapseEnd
            .Paste
          Else
            .Characters.Last.InsertAfter vbCr
            .Collapse wdCollapseEnd
            .Paste
          End If
        End With
      End If
    Next
  End If
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
merge, table

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge only the text in a table and keep the 2 original colums of a table Mail Merge Into Dynamic Table Jag618 Mail Merge 1 03-04-2013 11:26 PM
Cannot Merge Into A Table MacDee Mail Merge 1 01-29-2013 07:21 PM
Merge only the text in a table and keep the 2 original colums of a table mail merge with table nadja Mail Merge 5 03-06-2012 05:41 PM
Merge only the text in a table and keep the 2 original colums of a table Merge Two Table in VBA donbexcel Word VBA 2 10-21-2011 11:46 AM
Merge only the text in a table and keep the 2 original colums of a table Select Text in Table but Table Gets Selected Too RBusiness Word 1 06-07-2011 04:26 PM

Other Forums: Access Forums

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


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