Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Paste the following code into a VBA module in an open workbook. Select one
cell (at a time) which should be bolded/unbolded. From the Tools menu, select Macro Macros BoldUnbold Run. Sub BoldUnbold() Dim Rx As String, x As Integer Dim UnboldNow As Boolean Rx$ = ActiveCell.FormulaR1C1 UnboldNow = False For x% = 1 To Len(Rx$) Select Case Mid(Rx$, x%, 1) Case "(" With ActiveCell.Characters(Start:=x%, Length:=1).Font .FontStyle = "Regular" End With UnboldNow = True Case ")" With ActiveCell.Characters(Start:=x%, Length:=1).Font .FontStyle = "Regular" End With UnboldNow = False Case Else If UnboldNow = True Then With ActiveCell.Characters(Start:=x%, Length:=1).Font .FontStyle = "Regular" End With Else With ActiveCell.Characters(Start:=x%, Length:=1).Font .FontStyle = "Bold" End With End If End Select Next x% End Sub Hope this helps, Hutch "chris" wrote: 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! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i make one part of my formula bold and the other normal? | Excel Worksheet Functions | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) | |||
bold part of cell unavailable at time | Excel Worksheet Functions | |||
Automatically outline all email addresses in a given text by putting them in red-bold | Excel Discussion (Misc queries) | |||
Bold part of formula results | Excel Discussion (Misc queries) |