macro that strips data from string
- From: "Calop" <calop.bradford@xxxxxxxxxxx>
- Date: Sun, 17 Sep 2006 13:21:44 -0400
Hi,
I am new to VBA & Macros. Appreciate any help I can get. I have a macro that
strip's data from a string and it works fine except I need it to strip
further in the string. example of results:
bunder_linn-S1/0-720L-140.55.135.34-NIPR-1.5M(In)
What I need is to strip from the second - to the (
example: bunder_linn-S1/0-720L-140.55.135.34-NIPR-1.5M(In)
It can strip and copy to clipboard or to cell b1. Either way will work. This
macro was in a word doc, will it work in excel also?
Sub AREA_REPORT()
'
' AREA_REPORT Macro
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[-]*[(]"
.Replacement.Text = " ("
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.WholeStory
Selection.Cut
End Sub
Thanks,
Calop
.
- Follow-Ups:
- Re: macro that strips data from string
- From: Bob Phillips
- Re: macro that strips data from string
- Prev by Date: Re: Pasting Formulas bug?
- Next by Date: Re: macro that strips data from string
- Previous by thread: cannot open excel files after upgrading
- Next by thread: Re: macro that strips data from string
- Index(es):
Relevant Pages
|