I have a macro that pulls columns A,C,D,F from sheets"database" and pastes them in A,B,C,D in sheet1 . The problem is, I don't want them pulled and pasted in that order, I want them instead to be in a different order. Is there a way to paste them in a different order?
I just want to swap the last two columns so that it looks like this: database column A goes to sheet1 colum A, database column C goes to sheet1 column B, database column F goes to sheet 1 column C and database column D goes to sheet 1 columnD
Here is the macro, it is also located in the worbook under the "runreport" module. THanks in advance everyone!!
Option Explicit
'A,C,D,F
Sub RunSort()
Sheets("Sheet1").[a2:a1000].ClearContents
' Display header
Sheets("Sheet1").Columns("A:A").ColumnWidth = 10.88
Sheets("Sheet1").Range("A1") = "Part No."
Sheets("Sheet1").Columns("B:B").ColumnWidth = 7.14
Sheets("Sheet1").Range("B1") = "Line Item"
Sheets("Sheet1").Columns("C:C").ColumnWidth = 11.63
Sheets("Sheet1").Range("C1") = "Cust. Date"
Sheets("Sheet1").Columns("D:D").ColumnWidth = 7.86
Sheets("Sheet1").Range("D1") = "Qty."
Sheets("Database").[a1:a1000].AutoFilter 1, "030-17081-1"
Sheets("Database").Range("A2:A1000,C2:C1000,D2:D1000, F2:F1000").Copy Sheets("Sheet1").Range("A65536").End(xlUp)(2)
Sheets("Database").[a1].AutoFilter
End Sub
Bookmarks