Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50057

multiple find and replace macro (clased file)

$
0
0
Code:

Sub multiFindNReplace()
    Dim myList, myRange
    Set myList = Sheets("sheet3").Range("A8:B10") 'two column range where find/replace pairs are
    Set myRange = Sheets("sheet3").Range("D1:F100") 'range to be searched
    For Each cel In myList.Columns(1).Cells
        myRange.Replace what:=cel.Value, replacement:=cel.Offset(0, 1).Value
    Next cel
End Sub

Hi
I'm very much like the format of the code above.
I would like a new code with the same format.
Change Find new code files will be closed.
(Files in a folder)
I'm sorry for the English.
I am writing with Google translate.

Viewing all articles
Browse latest Browse all 50057

Trending Articles