Hello,
I am trying to correct a very simple macro for filtering and copying data from "Master" sheet to a second "Complete" and third "In Progress" sheet. I would like to filter rows denoted with the data "C" in the "Master" sheet to the sheet "Complete." Rows with data "IP" will be filtered and copied to sheet "In Progress." All data should remain in "Master" sheet; just copied over.
I've created a sheet called "Criteria" in the workbook, which contains the ="C" criteria in cells H1:H2 and the ="IP" criteria in cells I1:I2.
Here is what I have:
Sub FilterCopyToOtherSheet()
'
Sheets("Master").Range("1:1048576").AdvancedFilter _
Action = x1FilterCopy, _
CriteriaRange:=Sheets("Criteria").Range("H1:H2"), _
CopyToRange:=Sheets("Complete").Range("A1:W1"), _
Unique:=False
Sheets("Master").Range("1:1048576").AdvancedFilter _
Action = x1FilterCopy, _
CriteriaRange:=Sheets("Criteria").Range("I1:I2"), _
CopyToRange:=Sheets("In Progress").Range("A1:W1"), _
Unique:=False
End Sub
Unfortunately, It is only filtering the data in "Master" not actually copying it over to sheets "Complete" and "In Progress."
Any help or correcting of my code would be greatly appreciated.
Thank you,
Amy
I am trying to correct a very simple macro for filtering and copying data from "Master" sheet to a second "Complete" and third "In Progress" sheet. I would like to filter rows denoted with the data "C" in the "Master" sheet to the sheet "Complete." Rows with data "IP" will be filtered and copied to sheet "In Progress." All data should remain in "Master" sheet; just copied over.
I've created a sheet called "Criteria" in the workbook, which contains the ="C" criteria in cells H1:H2 and the ="IP" criteria in cells I1:I2.
Here is what I have:
Sub FilterCopyToOtherSheet()
'
Sheets("Master").Range("1:1048576").AdvancedFilter _
Action = x1FilterCopy, _
CriteriaRange:=Sheets("Criteria").Range("H1:H2"), _
CopyToRange:=Sheets("Complete").Range("A1:W1"), _
Unique:=False
Sheets("Master").Range("1:1048576").AdvancedFilter _
Action = x1FilterCopy, _
CriteriaRange:=Sheets("Criteria").Range("I1:I2"), _
CopyToRange:=Sheets("In Progress").Range("A1:W1"), _
Unique:=False
End Sub
Unfortunately, It is only filtering the data in "Master" not actually copying it over to sheets "Complete" and "In Progress."
Any help or correcting of my code would be greatly appreciated.
Thank you,
Amy