hi this will do:
just replace the find and replace strings:
Sub findreplace()
Dim ws As Worksheet
Dim fList As Variant
Dim replacelist As Variant
Dim aa As Long
fList = Array("Find1", "Find2", "Find3", "Find4")
replacelist = Array("Replace1", "Replace2", "Replace3", "Replace4")
For aa = LBound(fList) To UBound(fList)
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Replace What:=fList(aa), Replacement:=replacelist(aa), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next ws
Next aa
End Sub
or, you can use input box:
Sub test()
Dim ws As Worksheet
Dim fList As Variant
Dim replacelist As Variant
Dim aa As Long
Dim mfile As Variant
Dim replaceS As Variant
mfile = InputBox("Place find text")
replaceS = InputBox("Place replace text")
fList = Array(mfile)
replacelist = Array(replaceS)
For aa = LBound(fList) To UBound(fList)
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Replace What:=fList(aa), Replacement:=replacelist(aa), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next ws
Next aa
End Sub
Bookmarks