Chris,
The following code will make bold text within parentheses (including the
parens). Select the range of cells to modify and then run the macro. The
text in each cell should NOT be bold in any way when you run the code.
Sub BoldParens()
Dim Pos1 As Long
Dim Pos2 As Long
Dim Rng As Range
For Each Rng In Selection.Cells
With Rng
If .HasFormula = False Then
Pos1 = 1
Pos2 = 1
Pos1 = InStr(1, .Value, "(")
Do Until Pos1 = 0
Pos2 = InStr(Pos1, .Value, ")")
If Pos2 0 Then
.Characters(Pos1, Pos2 - Pos1 + 1).Font.Bold = True
Else
Exit Do
End If
Pos1 = InStr(Pos2 + 1, .Value, "(")
Loop
End If
End With
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
"chris" wrote in message
...
I have a variable length text in a column of cells where I want some of the
text to stand out differently than other parts. I want to make some bold
and
some not. I want the location areas between parentheses, including the
parens, to be non-bold.
FedEx Ground (PA, USA) ; FedEx (TN, USA) ; FedEx Kinko's (CA, USA) ; Fedex
Freight East (AR, USA)
I can bold the whole thing then somehow take the bold off the parens, or
vice versa..
Can you tell me how to do that?
Thanks in Advance!