multiple sets words replace
This is just an example. We have a worksheet called "xlator". The
translation table is in columns A & B. The text to be editted is in
"Sheet2". Enter and run the following macro:
Sub transla()
Dim inn() As String, outt() As String
Sheets("xlator").Activate
n = Cells(Rows.Count, 1).End(xlUp).Row
ReDim inn(1 To n), outt(1 To n)
For i = 1 To n
inn(i) = Cells(i, 1).Value
outt(i) = Cells(i, 2).Value
Next
Sheets("Sheet2").Activate
For Each r In ActiveSheet.UsedRange
v = r.Value
For i = 1 To n
v = Replace(v, inn(i), outt(i))
Next
r.Value = v
Next
End Sub
--
Gary''s Student - gsnu2007g
"dk" wrote:
Is there anyway to make a listinng for find & Replace
ex;if=then
out=like
hello=go
we have about 100 different words that we want to replace with others
so we want to make a txt or other file of the full list & then run in excel
or word a 1 step find replace
|