find from one tab and replace on another---Urgent!

I have a workbook that consists of two tabs, table and data.  What I am needing to do is take the accts on the "table" tab and find them on the "data" tab.  When it finds one, change the content from what it shows on "table" and replace it in "data".  If it can't find any acct then just leave things alone.  

I know we can use lookups and such but what i would like to do is to be able to automate this process using a VBA script so that it is done without formula's.  

I have attached a test workbook that I think explains things better than I have done.  Any help would be greatly appreciated.

Who is Participating?
Saqib Husain, SyedEngineerCommented:
Try this sub
Sub tbl2dat()
Set dat = ActiveWorkbook.Sheets("Data")
Set tbl = ActiveWorkbook.Sheets("Table")
On Error Resume Next
For Each cel In tbl.Range("A:A")
If cel.Value <> "" Then
dat.Range("A:A").Find(cel.Value, , , xlWhole).Offset(0, 3) = cel.Offset(0, 1)
End If
Next cel
On Error GoTo 0
End Sub

Open in new window

spudmccAuthor Commented:
That worked perfectly!  Thank you so much for your time, talent and knowledge.  I so much appreciate it!

Andy (Spudmcc)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.