I tried to make part of a string bold within a cell which look like this
Number: 10 (Ten)
The "Number: " and "10 (Ten)" is from separate cell
for example A1 contains "Number: " , A2 contains "10 (Ten)" , and what I wanted to do is A3 contains A1 & A2 but only the text from A2 is bold within A3 cell
Here's the code that I tried
Dim A As Range
Dim B As Range
Dim C As Range
Dim D As Range
Set A = Range("A1")
Set B = Range("B1")
Set C = Range("C1")
Set D = Range("D1")
With Range("A2")
.font.Bold = False
Application.EnableEvents = False
.Value = [A] + " " & _
[B] + " " & _
[C] + " " & _
[D]
.Characters(Len([A]) + 2, Len([B])).font.Bold = True
.Characters(Len([A]) + Len([B]) + Len([C]) + 4, Len([D])).font.Bold = True
Application.EnableEvents = True
End With
With that solution I could have "A1 B1 C1 D1"
It works fine, but only if A1 is text, when it's number I receive an error