PDA

View Full Version : Paste multiple cells into one



jmsantoro71
05-15-2015, 01:02 PM
Here is what I have across multiple rows in the same column...
This
Is
My
Data
I have code to select and copy, but I need to paste into one cell like this...
This Is My Data

mperrah
05-15-2015, 02:29 PM
something like this?
Select the cells you want concatenated
This will put the result to the right of the first cell selected, with a space in between each original cell


Sub cncnt()
For Each cell In Selection
If Len(cell) > 0 Then
conCatString = conCatString & cell.Value & " "
End If

Next cell ' move to next cell in selection
ActiveCell.Offset(, 1).Value = conCatString
End Sub

-mark