View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Looking for a quick way.

It's gonna be a cell by cell effort.

If you only have one set of parens, you may want to look at instr() to find
each.

Option Explicit
Sub testme()
Dim myRng As Range
Dim myCell As Range
Dim StartPos As Long
Dim LastPos As Long

Set myRng = Selection

For Each myCell In myRng.Cells
StartPos = InStr(1, myCell.Value, "(", vbTextCompare)
LastPos = InStr(1, myCell.Value, ")", vbTextCompare)

If StartPos * LastPos 0 Then
If StartPos < LastPos Then
With myCell.Characters _
(Start:=StartPos, Length:=LastPos - StartPos + 1)
.Font.FontStyle = "Italic"
End With
End If
End If
Next myCell

End Sub



Michael Koerner wrote:

I have roughly 1200 records that I need to change (whatever is here)
including the brackets to italic Any way to do it with a quick macro or is
it going to be a one-at-a-time effort.

--

Regards
Michael Koerner


--

Dave Peterson