Hi I have this lines of code which is finding the value from the array and replacing it by the user, however what I wanted to do is, when the code runs, it will return the value that are not included from the array and replace it by the user.
This is what I have right now and It is not returning the value that are not present from the array please help.
VBA Code:
Sub upload_data_practice()
Dim FndWrd As Variant, RpWrd As Variant
fndList = Array("Apple","Mango","banana","pineapple")
'Loop through each item in Array lists
For x = LBound(fndList) To UBound(fndList)
'Loop through each worksheet in ActiveWorkbook
Set FndWrd = WSdest.Cells.Find(fndList(x), , , , xlByRows, , False, , False)
Set Stat = Range("q2:q20000")
If Not FndWrd = Stat.Value Then
RpWrd = InputBox("Replace " & fndList(x) & " " & "with:")
End If
WSdest.Cells.Replace What:=fndList(x), Replacement:=RpWrd, _
LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next x
ActiveWorkbook.Close False
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
This is what I have right now and It is not returning the value that are not present from the array please help.