Hi Bob
this can only be done with VBA. Try the following macro (which merges
the selection)
Sub merge_cells()
Dim ret_str
Dim rng As Range
Dim cell As Range
Set rng = Selection
For Each cell In rng
If cell.Value <> "" Then
If ret_str = "" Then
ret_str = cell.Value
Else
ret_str = ret_str & Chr(10) & cell.Value
End If
End If
Next
Application.DisplayAlerts = False
With rng
.MergeCells = True
.Value = ret_str
End With
Application.DisplayAlerts = True
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.