I found this similar question on here (excel vba: make part of string bold), but I'd like to know how to tweak it to where the only the last line of every cell in a given column is bolded. Is this possible?
Short summary: I have a file with 2 columns where updates are stored with a corresponding date of the update. Here's an example, where all of this is typed in one cell:
12/15 - A meeting was held on 11/21 to discuss alternative solutions
12/22 - The field is going to be created at the account level
12/29 - The field is built in TEST environment, ready for operations testing
01/05 - Functionality confirmed; ready to move into PROD
In this example, I need the last update line, "01/05 - Functionality confirmed; ready to move into PROD" to be bolded.
Any help is greatly appreciated.
EDIT: Is there a way to update this so that it only bolds the cell in column E of that row if column L is not blank (meaning there was no updated note entered)? Otherwise, it moves on to the next row. I have the following code, but I'm constantly getting a data type mismatch error 13. Also, I'm probably missing some code as well.
Sub BoldLastLine1()
Dim p As Long
Dim r As Range
For Each r In ActiveSheet.Range("A3:L100")
If Len(Trim(ActiveSheet.Cells(r, 12).Value)) <> 0 Then
p = InStrRev(r.Value, vbLf)
If p > 0 Then
With r.Characters(p + 1, Len(r.Value) - p).Font
.Bold = True
.Size = 16
End With
End If
End If
Next
MsgBox ("Updates Completed.")
End Sub