View Single Post
  #4   Report Post  
Martin P
 
Posts: n/a
Default

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.