Macro with multiple advanced filters

thecueballkid

New Member
Joined
Aug 14, 2013
Messages
1
I am trying to build a macro that will run multiple advanced filters, 16 total. Each will be using criteria from one column in the raw data sheet (sheet1). This is what I have so far. When I run the first part by itself it runs fine but it does not work when I try to add the code for the additional filter.

"d1" and d"3" are the names of the other tabs.



Sub Macro5()
'
' Macro5 Macro
'

'
Sheets("Sheet1").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("d1").Range("A1:A2"), _
CopyToRange:=Sheets("d1").Range("d1!Extract"), _
Unique:=False

Sheets("Sheet1").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("d3").Range("A1:A2"), _
CopyToRange:=Sheets("d3").Range("d3!Extract"), _
Unique:=False


End Sub
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,216,111
Messages
6,128,899
Members
449,477
Latest member
panjongshing

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