Results 1 to 7 of 7

Convert Word Table to Single Excel Cell with Linefeeds

Threaded View

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Madison, NJ, USA
    MS-Off Ver
    Microsoft Office 2011
    Posts
    4

    Convert Word Table to Single Excel Cell with Linefeeds

    I am receiving the results of a Web-based test via e-mail. I am able to paste the e-mail's contents into an Excel spreadsheet and use it to manipulate the data as necessary, with one exception, namely an answer that requires the test taker to write a multi-paragraph e-mail response. I am able to identify which cells in Column A this answer occupies, for sake of argument, A60 to A70.

    I want to have the contents of these cells appear in a single cell, B60, with linefeeds. I did find an Excel macro on this forum:

    Sub FlexConcating()
    Dim cell As Range
    Dim r As Integer
    Dim c As Integer
    Dim Cnt As Integer
    Cnt = -1
    Dim strRslt As String
       For Each cell In Selection
           r = cell.Row
           c = cell.Column
           Cnt = Cnt + 1
           strRslt = strRslt & vbCrLf & cell
       Next cell
       Cells(r - Cnt, c + 1) = strRslt
    End Sub
    This works after a fashion, but there are undesirable leading spaces at the beginning of each paragraph.

    If I instead copy the cells into a Word document, I notice that they come through as a table. If I convert the table to text in Word, then paste it back into the formula bar of B60, I get what I want.

    My question is, can this be done wholly within Excel, without the need for Word?

    Thanks in advance for any help on this.

    Burt Spielman
    Madison, NJ
    Last edited by bspielman; 03-28-2012 at 05:21 AM.

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