Sub ConcatenateText()
Dim lastRow As Long
Dim lastCol As Long
Dim tempLastRow As Long
Dim i As Long 'Increment Rows
Dim p As Long 'Increment Columns
Dim conValue As String
Dim conSheet As String 'Concatenate Sheet Name
Dim destSheet As String 'Destination Sheet Name
destSheet = "Sheet1"
conSheet = "surveyText"
lastRow = Sheets(conSheet).Range("A" & Rows.Count).End(xlUp).Row
lastCol = Sheets(conSheet).Range(Columns.Count & ":1").End(xlToRight).Column
For i = 2 To lastRow
For p = 2 To lastCol Step 2
conValue = conValue & " | " & Sheets(conSheet).Cells(i, p).Value
Next
tempLastRow = Sheets(destSheet).Range("A" & Rows.Count).End(xlUp).Row + 1
Sheets(destSheet).Cells(tempLastRow, 1).Value = Right(conValue, Len(conValue) - 3)
conValue = ""
Next i
MsgBox "Done!"
End Sub
|