Taking this a few steps further, I'm trying to have a few strings with regular text and a few strings of bold text together.
example:
A1: text_string_1
A2: text_string_2_BOLD
A3: text_string_3
A4: Month_string_4_BOLD
A5: Day_string_5_BOLD
A6: Year_string_6_BOLD
A7: text_string_7
A8: Month_string_8_BOLD
A9: Day_string_9_BOLD
A10: Year_string_10_BOLD
Here's the code I'm using:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1,A2,A3,A4,A5,A6,A7,A8,A9,A10")) Is Nothing Then
On Error GoTo Oops
Application.EnableEvents = False
With Worksheets("Sheet1").Range("B15")
.Value = Trim(Me.Range("A1").Text & " " & _
Me.Range("A2").Text & " " & _
Me.Range("A3").Text & " " & _
Me.Range("A4").Text & " " & _
Me.Range("A5").Text & ", " & _
Me.Range("A6").Text & " " & _
Me.Range("A7").Text & " " & _
Me.Range("A8").Text & ", " & _
Me.Range("A9").Text & " " & _
Me.Range("A10").Text & ".")
.Characters(Start:=Len(Me.Range("A1").Text) + 2, _
Length:=Len(Me.Range("A2").Text)).Font.bold = True
End With
Oops:
Application.EnableEvents = True
End If
End Sub
My output gives me a nice concatenated output with text strings 1 - 10 with A2 being bold. However, I can't figure out how to modify the ".Characters" section of my code to bold text A4, A5, A6, and A8, A9, and A10.
Any help would be greatly appreciated. Thanks.
Bookmarks