Search for name in another workbook, copy row and paste to this workbook

had

New Member
Joined
Oct 21, 2009
Messages
1
Hi there,

I'm quite new to vb and I'm trying towrite a code to import data from another workbook.

More precisely, I want my code to do the following:
-Find the name I want in workbook1
-Copy entire row
- Paste entire row in workbook2

What I've written so far is the following but I get "Run-Time error '13' Type mismatch"

Private Sub ImportData_Click()

Dim FundRow As Range

Workbooks("Workbook1").Sheets("Sheet2").Range("F5:F10000").Cells.Find(What:=CStr(Cells(4, 7).Value), After:=Cells(1, 1), MatchCase:=False).Activate

FundRow = ActiveCell.Rows.Copy(Destination:=Workbooks("Workbook2").Sheets("Sheet2").Cells(6, 1))

End Sub


Anyone can help me with that?
thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top