Copy information after last filled row of another sheet

artemisa34

New Member
Joined
Jun 28, 2018
Messages
7
Hi, can you help me please? I am trying to copy some data from a sheet called "CargaETL" to another called "ETL FXS", where there's already data, so new information should be copied right after the last filled row in "ETL FXS".

The macro I am currently using is this one:


Sub CopyPasteETLFXS()


Dim DLR As Long, WLR As Long
DLR = Sheets("CargaETL").Range("B10000").End(xlUp).Row
WLR = Sheets("ETL FXS").Range("A10000").End(xlUp).Row


Sheets("CargaETL").Range("A2:BX" & DLR).Copy Destination:=Sheets("ETL FXS").Range("A" & WLR + 1)


End Sub

It returns Debug and suggests that the error may be related to line
"DLR = Sheets("CargaETL").Range("B10000").End(xlUp).Row"

Any help is appreciated!!Thanks!!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi & welcome to the board.
What error message do you get?
 
Upvote 0
In that case do you have a sheet called CargaETL, check for any leading/trailing spaces.
 
Upvote 0
Try:
Code:
Sub CopyPasteETLFXS()
    Dim DLR As Long
    DLR = Sheets("CargaETL").Range("B" & Rows.Count).End(xlUp).Row
    Sheets("CargaETL").Range("A2:BX" & DLR).Copy Sheets("ETL FXS").Cells(Sheets("ETL FXS").Rows.Count, "A").End(xlUp).Offset(1, 0)
End Su
b
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,227
Members
453,025
Latest member
Hannah_Pham93

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