Hi all,
I have a meeting agenda table (produced by power query) that contains text I'd like to format as follows -
in D7:D13, I need to format the text before the colon Bold and ensure the text after the colon remains regular, not bold.
I have this code from another thread:
Sub BoldPreColon()
Worksheets("Agenda").Activate
Dim i As Long, N As Long, s As String, j As Long
N = Cells(Rows.Count, "D").End(xlUp).Row
For i = 1 To 13
s = Cells(i, 4)
j = InStr(4, s, ":")
If j <> 0 Then
Cells(i, 4).Characters(1, j - 1).Font.Bold = True
End If
Next i
End Sub
It works beautifully, but when I refresh the power query table, it applies Bold to the entire cell contents. I need to be able to run a macro that reinstates regular, non-bold text after the colons.
Would be extremely grateful for any help as I have no coding skills at all!
Thanks!
I have a meeting agenda table (produced by power query) that contains text I'd like to format as follows -
in D7:D13, I need to format the text before the colon Bold and ensure the text after the colon remains regular, not bold.
Meeting Name: text after the colon |
Meeting Date: text after the colon |
Meeting Time: text after the colon |
Attendees: text after the colon |
Apologies: text after the colon |
Minutes: text after the colon |
Copy To: text after the colon |
I have this code from another thread:
Sub BoldPreColon()
Worksheets("Agenda").Activate
Dim i As Long, N As Long, s As String, j As Long
N = Cells(Rows.Count, "D").End(xlUp).Row
For i = 1 To 13
s = Cells(i, 4)
j = InStr(4, s, ":")
If j <> 0 Then
Cells(i, 4).Characters(1, j - 1).Font.Bold = True
End If
Next i
End Sub
It works beautifully, but when I refresh the power query table, it applies Bold to the entire cell contents. I need to be able to run a macro that reinstates regular, non-bold text after the colons.
Would be extremely grateful for any help as I have no coding skills at all!
Thanks!