Copying columns from one sheet to another - works for the 1st one but fails on the 2nd

Pmlag

New Member
Joined
Aug 24, 2016
Messages
8
Hi,

Can someone please help? As the titles says, I'm trying to copy columns from one sheet to a specific cell in another sheet. It works for the first one, but when it gets to the second I get the error "Copy method of range class failed". I searched in other threads for the same error but couldn't find an answer to this. I've got named ranges and rows. I'm going to post just the part of the code that has the issue but please let me know if you need more:

Code:
Range("table4").Find(What:="Column1").Activate
  ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
  Range(Selection, Selection.End(xlDown)).Select
  Selection.Copy Destination:=Worksheets("Sheet1").Cells(firstrow, 1)
  
  Range("table4").Find(What:="Column2").Activate
  ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
  Range(Selection, Selection.End(xlDown)).Select
  Selection.Copy Destination:=Worksheets("Sheet1").Cells(firstrow, 2)

Thanks in advance
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,246
Messages
6,170,987
Members
452,373
Latest member
TimReeks

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