Hello How do I correct the macro below. I want to change the words FXG,
FXR, GFX, and FXT to say FAX
Thank you thank you
Range("C1:C3169").Select
Selection.Replace What:=("FXG""FXR""GFX""FXT")Replacement:="FAX",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Tom Hutchins - 30 Apr 2008 13:54 GMT
One way...
Sub AAA()
Range("C1:C3169").Select
Call ReplaceText("FXG", "FAX")
Call ReplaceText("FXR", "FAX")
Call ReplaceText("GFX", "FAX")
Call ReplaceText("FXT", "FAX")
End Sub
Sub ReplaceText(FromTxt As String, ToTxt As String)
Selection.Replace What:=FromTxt$, Replacement:=ToTxt$, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Hope this helps,
Hutch
> Hello How do I correct the macro below. I want to change the words FXG,
> FXR, GFX, and FXT to say FAX
[quoted text clipped - 6 lines]
> ReplaceFormat:=False
> End Sub
Dave Peterson - 30 Apr 2008 13:56 GMT
dim myWords as Variant
dim wCtr as long
myWords = array("FXG","FXR","GFX","FXT")
for wctr = lbound(mywords) to ubound(mywords)
activesheet.range("c1:C3169").replace what:=mywords(wctr), _
replacement:="FAX", lookat:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
next wctr
> Hello How do I correct the macro below. I want to change the words FXG,
> FXR, GFX, and FXT to say FAX
[quoted text clipped - 6 lines]
> ReplaceFormat:=False
> End Sub

Signature
Dave Peterson