View Single Post
 
Old 06-13-2020, 10:22 PM
kingston123 kingston123 is offline Windows 10 Office 2013
Advanced Beginner
 
Join Date: Sep 2018
Posts: 85
kingston123 is on a distinguished road
Default

Quote:
Originally Posted by Purfleet View Post
You could do =C4&CHAR(10)&C5 and turn on Wrap text which is much nicer

But if you insist on using merged cells you can select the top cell of the 2 you want merged and run this

Sub MergeCellAndBelow()

Dim r As Range

Dim c1 As String
Dim c2 As String

c1 = ActiveCell.Value
c2 = ActiveCell.Offset(1, 0).Value

Application.DisplayAlerts = False
Range(ActiveCell.Address & ":" & ActiveCell.Offset(1, 0).Address).Merge
Application.DisplayAlerts = True

With ActiveCell
.Value = c1 & Chr(10) & c2
.WrapText = True
End With

End Sub

Run where exactly? command prompt?
Reply With Quote