• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

copy and paste the data from sheet1 and sheet2 to sheet3

Code:
Option Explicit

Sub cpynpste()
    Dim w1 As Worksheet, w2 As Worksheet, w3 As Worksheet
    Dim lr As Long, lr2 As Long, lr3 As Long
    Set w1 = Sheets("Sheet1"): Set w2 = Sheets("Sheet2")
    Set w3 = Sheets("Sheet3")
    lr = w1.Range("A" & Rows.Count).End(xlUp).Row
    lr2 = w2.Range("A" & Rows.Count).End(xlUp).Row
    lr3 = w3.Range("A" & Rows.Count).End(xlUp).Row
    w1.Range("A2:G" & lr).Copy
    w3.Range("A" & lr3 + 1).PasteSpecial (xlPasteValues)
    w2.Range("A2:G" & lr2).Copy
    w3.Range("H" & lr3 + 1).PasteSpecial (xlPasteValues)

    MsgBox "Action Complete"
End Sub
 
Copy the data from sheet1 and sheet2
and paste to sheet3 as shown in sheet3
As a very beginner starter :​
Code:
Sub Demo1()
    Sheet3.UsedRange.Clear
    Sheet2.UsedRange.Copy Sheet3.Cells(1)
    Sheet1.UsedRange.Copy Sheet3.Cells(8)
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top