Thread: Macro Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Macro Help

I'm guessing you want the trailing space gone too.

Sub DeleteParan()
Dim r As Range
Dim r1 As Range
Dim p As Long
Set r = Columns("A") 'Change as needed
For Each r1 = r.Cells
p = InStr(1,r1,"(")
If p 0 Then
r1 = Trim(Left(r1, p - 1))
End If
Next
End Sub

HTH

Charles Chickering

wrote:
Hi,

I'm looking for a macro that will take a column of data that look like
this

B. Tallackson (1)
I. Pikkarainen (1)
J. Pushor (1)
A. Murray (1)
B. Simon (33)
M. Hartigan (51)
G. Platt (1)
P. Vrana (31)

and delete the paranthases and any numbers in them.

Much appreciated.

Thanks!