Hello,
I have a workbook with thousands of columns and I only need to extract a few for an analysis. I would like to choose specific columns, copy them, and paste them into the same workbook and sheet and delete the rest of them. I also need to delete multiple rows of data. This is what I have so far:
Set range1 = Range("A:A, P:P, O:O, S:S, CE:CE, CL:CL, CP:CP, FL:FL")
range1.Copy
Set newbook = Workbooks.Add
ActiveCell.PasteSpecial Paste:=xlPasteValues
Rows("3:400").EntireRow.Delete
Rows("601:998").EntireRow.Delete
Rows("1199-1596").EntireRow.Delete
This macro copies and pastes the data into a new workbook and I do not need to do that. Also, I need column P to come before column O, and this macro is not doing that. Finally, all of the rows I need to delete are not deleting. Only rows 3-400 are deleting and not the rest. This macro needs to be applied to many other data sets. Anyt help?
Thank you!
Bookmarks