Se pretendermos associar o conteúdo de várias células numa única e com algum texto em negrito e em maiúscula, podemos utilizar este tipo de código:
Sub Concat()
Dim i As Long, LR As Long, j As Long
LR = Range(“B” & Rows.Count).End(xlUp).Row
For i = 2 To LR
With Range(“G” & i)
.Value = Join(Application.Transpose(Application.Transpose(.Offset(, -5).Resize(, 5))), vbNullString)
j = InStr(1, .Value, “-“)
.Characters(Start:=1, Length:=j).Font.Bold = False
End With
Next i
LR = Range(“B” & Rows.Count).End(xlUp).Row
For i = 2 To LR
With Range(“G” & i)
.Value = Join(Application.Transpose(Application.Transpose(.Offset(, -5).Resize(, 5))), vbNullString)
j = InStr(1, .Value, “-“)
.Value = UCase(.Value)
.Characters(Start:=1, Length:=j).Font.Bold = True
End With
Next i
End Sub