Hi, I'm trying to figure out how to apply bold to a part of a cell, the contents of which results from a formula.
I have in cell A4:
="DWG NO:" & vlookup another cell
which results in:
DWG NO: 1234-XXX-55-X <--the length of this number can vary.
I want it to be formatted like:
DWG NO: 1234-XXX-55-X
I tried using the characters method to bold everything except "DWG NO:". When I step through the code, I dont get any errors, but even after running the line:
If I ask in the immediate window the same thing, the value still says false. It never changes...
My code I tried:
Any suggestions??
I have in cell A4:
="DWG NO:" & vlookup another cell
which results in:
DWG NO: 1234-XXX-55-X <--the length of this number can vary.
I want it to be formatted like:
DWG NO: 1234-XXX-55-X
I tried using the characters method to bold everything except "DWG NO:". When I step through the code, I dont get any errors, but even after running the line:
Code:
With Target
.Characters(7, intBold).Font.Bold = True
End With
My code I tried:
Code:
Dim intBold As Integer
Dim strComplete As String
Dim strBold As String
If Not Intersect(Target, Range("A4")) Is Nothing Then
strComplete = Target.Text
strBold = Mid(strComplete, 8)
intBold = Len(strBold)
With Target
.Characters(7, intBold).Font.Bold = True
End With
End If
End Sub
Any suggestions??