View Single Post
 
Old 11-25-2016, 02:30 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It can't be done without macros. It can be done with a macro, based on your example. However there can be no split or merged cells and the selection must be contiguous.

Code:
Sub PasteContinuous()
'Graham Mayor - http://www.gmayor.com - Last updated - 25/11/2016
Dim oRng As Range, oRng1 As Range, oRng2 As Range
Dim Coll As New Collection
Dim oCell As Cell
Dim i As Long
    If Selection.Information(wdWithInTable) Then
        Set oRng = Selection.Range
        For Each oCell In oRng.Cells
            Set oRng1 = oCell.Range
            oRng1.End = oRng1.End - 1
            Coll.Add oRng1.Text
        Next oCell
        Set oCell = oRng.Next.Cells(1)
        Do
            On Error GoTo lbl_Exit
            For i = 1 To Coll.Count
                Set oRng2 = oCell.Range
                oRng2.End = oRng2.End - 1
                oRng2.Text = Coll(i)
                Set oRng2 = oRng2.Cells(1).Range
                Set oCell = oCell.Next
            Next i
        Loop
    End If
lbl_Exit:
    Set oCell = Nothing
    Set oRng = Nothing
    Set oRng1 = Nothing
    Set oRng2 = Nothing
    Set Coll = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote