I am trying to build a script that can match the number in column a of worksheet1 to the same number in column a of worksheet2 where ever it may be in that column. If it finds a match then copy the text from column b of worksheet1 to column c of worksheet2. Here is what I have so far:
Sub compare_replace()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Worksheets(1)
Set ws2 = Worksheets(2)
If ws1(a2(Match(ws2("a:a")))) Then
replace: ws2 ("c:2"), ws1("b:2")
Loop
End If
End Sub
Any assistance or links to other threads to read would be greatly appreciated.
Thanks in advance.
Sub compare_replace()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Worksheets(1)
Set ws2 = Worksheets(2)
If ws1(a2(Match(ws2("a:a")))) Then
replace: ws2 ("c:2"), ws1("b:2")
Loop
End If
End Sub
Any assistance or links to other threads to read would be greatly appreciated.
Thanks in advance.