Sub mrg()
Dim c As Range
Application.DisplayAlerts = False
For Each c In Range("A1:D10")
If c.Value Like "*abcd*" Then
c.Value = c.Value & Chr(10) & c.Offset(1).Value
c.Interior.ColorIndex = 6
With c.Resize(2)
.Merge
.WrapText = True
End With
End If
Next c
Application.DisplayAlerts = True
End Sub
Sub mrg()
Dim c As Range
Application.DisplayAlerts = False
For Each c In Range("A1:D10")
If c.Value Like "*abcd*" Then
c.Value = c.Value & Chr(10) & c.Offset(1).Value
c.Interior.ColorIndex = 6
With c.Resize(2)
.Merge
.WrapText = True
End With
c.Value = Replace(c.Value, "abc", vbNullString)
End If
Next c
Application.DisplayAlerts = True
End Sub