Probably should rewrite thus but:
Sub BoldText()
Dim x As Long
Dim rngCell As Range
Range("G4").FormulaR1C1 = _
"=IF(Information!R[3]C[6]="""","""",""Name of the student: ""& Information!R[3]C[6])"
If Not Intersect(ActiveCell, Columns("a:r")) Is Nothing Then
For Each rngCell In Cells(4, "A").Resize(, 18).Cells
With rngCell
If .HasFormula Then
.Formula = .Value: .Characters.Font.Bold = True: End If
x = InStr(1, rngCell, ":")
If x Then
.Characters(x).Font.Bold = True
.Characters(x + 1).Font.Bold = False
End If: End With
Next rngCell
End If
MsgBox "Done!", 64
End Sub
Bookmarks