View Single Post
 
Old 06-13-2020, 09:54 AM
Purfleet Purfleet is offline Windows 10 Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Agreed - merged cells are the devils own work and should be avoided

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



Its a bit rough and ready but should give you the idea

Last edited by Purfleet; 06-13-2020 at 09:57 AM. Reason: typo
Reply With Quote