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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
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,223,912
Messages
6,175,340
Members
452,637
Latest member
Ezio2866

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