Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What am I missing?

Status
Not open for further replies.

ComDawg

Vendor
Dec 14, 2001
18
0
0
US
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.
 




Hey Zack! Welcome back!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a brand NUANCE![tongue][/sub]
 
Thanks much Skip! Can't believe I'm actually getting some free time now!!! Been teaching classes for months! (Seems like forever, LOL!)

Good to see you again buddy. :)

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top