(Solved) – VBA – Copy columns A to I to a new worksheet at the end of the book

(solved)-–-vba-–-copy-columns-a-to-i-to-a-new-worksheet-at-the-end-of-the-book

I have wrote the following that will copy the first worksheet entirely to a new one, at the end of the current workbook.

Sub Copy()
    Dim test As Worksheet
    Sheets(1).Copy After:=Sheets(Sheets.Count)
    Set test = ActiveSheet
    test.Name = "copied sheet!"
End Sub

However, I figured that I really just need to copy the data in columns A to I only, I don’t care of the rest of the columns.

How can I do this please? Any help

Leave a Reply

Your email address will not be published. Required fields are marked *