How to copy a range from a worksheet and paste it after the last row on another worksheet using VBA?

I need to copy all rows except for the headers from sheet1 to after the last row of data on sheet2.  There could be up to 100 rows that need to be copied.  I also need to have the date entered in column “E” on sheet2 for each entry copied.  Please see the attached example.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
Sub mov2sht2()
Dim sr As Range
Dim tr As Range
Set tr = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
Set sr = Sheets("Sheet1").Range("A1").CurrentRegion.Offset(1)
sr.Copy tr
Range(tr, tr.End(xlDown)).Offset(, 4).Value = Date
End Sub
Roy CoxGroup Finance ManagerCommented:
Try this

Sheet2.Range("A1").CurrentRegion.Offset(1).Copy Sheet3.Cells(Sheet3.Rows.Count, 1).End(xlUp).Offset(1)

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kbay808Author Commented:
Works great!!!  Thanks
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Saqib Husain, SyedEngineerCommented:
Did the first comment not work?
Roy CoxGroup Finance ManagerCommented:
GlLad it helped.
kbay808Author Commented:
@Saqib Husain, Syed:  It does work for the example, but it’s not as robust as Roy’s solution.  As I added more columns of data only Roy’s solution worked.
Saqib Husain, SyedEngineerCommented:
There isn't any difference between the approach of either solution. Please show me the scenario where one  works and the other does not. I had started with the same one-line solution as Roy's but had to use variables because there was another requirement for the date which I have addressed but missing from the other solution.
kbay808Author Commented:
@Saqib Husain, Syed:  When I originally tested it, it did not work, but I’m unable to duplicate my results.  Your code is working, but I just noticed that both codes are copying the formulas.  I need it to only copy the values.  I reposted the question if you would like to respond.
kbay808Author Commented:
Roy CoxGroup Finance ManagerCommented:
You never mentioned not copying formulas. Simply use PasteSpecial values
Saqib Husain, SyedEngineerCommented:
So, if the code works you should reopen the question
kbay808Author Commented:
How do you do that?  I don't see an option for that?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.