+ Reply to Thread
Results 1 to 4 of 4

Copy Word tables to Excel

  1. #1
    Don
    Guest

    Copy Word tables to Excel

    I'm sure there might be a solution, I just can't find it
    now.....

    I have a table in Word that might or might not
    contain "returns." I want the table in Word to copy
    EXACTLY as is into Excel.

    If I have Don (hard return) Mike in one Word table cell.
    It splits this into two cells in Excel. Any way to
    prevent this. Pasting as a Word document is not an option

    Thanks so much in advance.

  2. #2
    Richard Neville
    Guest

    Re: Copy Word tables to Excel

    Replace the hard returns in Word with end-of-line marks (hold down shift key
    when you press Enter).

    "Don" <[email protected]> wrote in message
    news:[email protected]...
    > I'm sure there might be a solution, I just can't find it
    > now.....
    >
    > I have a table in Word that might or might not
    > contain "returns." I want the table in Word to copy
    > EXACTLY as is into Excel.
    >
    > If I have Don (hard return) Mike in one Word table cell.
    > It splits this into two cells in Excel. Any way to
    > prevent this. Pasting as a Word document is not an option
    >
    > Thanks so much in advance.




  3. #3
    Martin P
    Guest

    RE: Copy Word tables to Excel

    Change all hard breaks in the table to something like ¥, or anything else
    that does not otherwise appear in the text. Then copy to Excel. Use a macro
    to change ¥ to a manual line break. You will have to do with a manual line
    break; a hard return does not seem possible. I do not have a macro available
    right now. What it does is change Don¥Mike to "Don"&Chr(10)&"Mike". Perhaps
    somebody else is willing to do the macro part before I get there.

    "Don" wrote:

    > I'm sure there might be a solution, I just can't find it
    > now.....
    >
    > I have a table in Word that might or might not
    > contain "returns." I want the table in Word to copy
    > EXACTLY as is into Excel.
    >
    > If I have Don (hard return) Mike in one Word table cell.
    > It splits this into two cells in Excel. Any way to
    > prevent this. Pasting as a Word document is not an option
    >
    > Thanks so much in advance.
    >


  4. #4
    Martin P
    Guest

    RE: Copy Word tables to Excel

    I have created a macro for the final stage of having your Excel table look
    like the Word table (see my other post);

    Sub copyhardreturns()
    'This program changes ¥ to manual line breaks
    For j = 1 To 50
    For k = 1 To 50
    i = 0
    While i < Len(Cells(j, k))
    i = i + 1
    If Mid(Cells(j, k), i, 1) = "Â¥" Then
    Cells(j, k) = Mid(Cells(j, k), 1, i - 1) & Chr(10) & Mid(Cells(j,
    k), i + 1)
    End If
    Wend
    Next k
    Next j
    End Sub

    My procedure is then:

    (1) In Word, replace returns with ¥.
    (2) Copy the contents of the Word table to Excel
    (3) In Excel, run this macro.

    You might have to adjust the values for the for ... to ... next part.

    "Don" wrote:

    > I'm sure there might be a solution, I just can't find it
    > now.....
    >
    > I have a table in Word that might or might not
    > contain "returns." I want the table in Word to copy
    > EXACTLY as is into Excel.
    >
    > If I have Don (hard return) Mike in one Word table cell.
    > It splits this into two cells in Excel. Any way to
    > prevent this. Pasting as a Word document is not an option
    >
    > Thanks so much in advance.
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1