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
Bookmarks