I am using the following line of code in a bunch of different spreadsheets.
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("A1:M" & LastRow).Copy
The current whole code I am using it in is as follows:
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("A1:M" & LastRow).Copy
Workbooks.Add
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
What I tried to do was the following:
Range("A1:G,K1:L" & LastRow).Copy
The above did not work.
Since the main code is copying from one sheet to another, I was hoping that either the code i changed would work and if not how do I code the second copy/paste command to the book created by the Workbook.Add line. K1:L would need to be pasted into H:L on in the "existing" new book.
I could also edit the existing code to just delete the rows I don't need but i was curious to know if multiple ranges could be selected
Bookmarks