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
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Watch MrExcel Video

Forum statistics

Threads
1,109,084
Messages
5,526,755
Members
409,717
Latest member
Oscarsalone

This Week's Hot Topics

Top