Link to home
Start Free TrialLog in
Avatar of kbay808
kbay808Flag for United States of America

asked on

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

I have 2 solutions from a previous question that work, but both solutions copies and pastes the formulas.  I need it to only copy the values.

Saqib Husain, Syed:  
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

Open in new window


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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kbay808

ASKER

Works perfect.  Thanks for the fast response.
Glad to help