Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Help
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Help
Maybe you don't need a macro:
select the range to fix edit|Replace what: (* (open paren, followed by an asterisk) with: (leave blank) replace all You may want to replace " (*" -- spacebar, open paren, then asterisk. " 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! -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Help
ps, you could record a macro while you did it manually if you really wanted
code. " 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! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |