Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Concat Cel_12:=Target.Offset(, 2), Cel1:=Target, Cel2:=Target.Offset(, 1)
End If
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Concat Cel_12:=Target.Offset(, 1), Cel1:=Target.Offset(, -1), Cel2:=Target
End If
End Sub
Sub Concat(Cel_12 As Range, Cel1 As Range, Cel2 As Range)
Cel_12.NumberFormat = "@"
Cel_12 = Cel1.Text & Cel2.Text
With Cel_12.Characters(Start:=1, Length:=Len(Cel1.Text)).Font
.Name = Cel1.Font.Name
.FontStyle = Cel1.Font.FontStyle
.Size = Cel1.Font.Size
.Strikethrough = Cel1.Font.Strikethrough
.Superscript = Cel1.Font.Superscript
.Subscript = Cel1.Font.Subscript
.OutlineFont = Cel1.Font.OutlineFont
.Shadow = Cel1.Font.Shadow
.Underline = Cel1.Font.Underline
.ColorIndex = Cel1.Font.ColorIndex
End With
With Cel_12.Characters(Start:=Len(Cel1.Text) + 1, _
Length:=Len(Cel2.Text)).Font
.Name = Cel2.Font.Name
.FontStyle = Cel2.Font.FontStyle
.Size = Cel2.Font.Size
.Strikethrough = Cel2.Font.Strikethrough
.Superscript = Cel2.Font.Superscript
.Subscript = Cel2.Font.Subscript
.OutlineFont = Cel2.Font.OutlineFont
.Shadow = Cel2.Font.Shadow
.Underline = Cel2.Font.Underline
.ColorIndex = Cel2.Font.ColorIndex
End With
End Sub