Copy Conditional Date to New Sheet Macro

AmyQtoe

New Member
Joined
Sep 14, 2011
Messages
1
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
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,157
Messages
6,123,341
Members
449,097
Latest member
thnirmitha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top