Advanced Filter for 3 Criteria

gsheppar

Active Member
Joined
May 15, 2005
Messages
281
I'm trying to use the advanced filter to find phone #'s that show up in the table under fiscalyear 2011, 2010, and 2009, but it only filters if I put a phone number in. How can I set this up so that it finds all phone numbers that were used in 2009, 2010, and 2011 only (A phone number should only show up if it shows up in 2011, 2010, and 2009)?

Book1
ABCDEFGHIJKLMNOPQ
1Phonefiscalyear
22009
32010
42011
5OrderSourcefiscalyearFiscalWeekOfYearFiscalWeekStartDateOrderNoInitialRevenueQuantityDeletedOrderDeletedProductRevenueDeletedQuantityShippedOrderShippedOrderShippedQuantityBusinessNameParentCompanyStoreNamePhone
6CallCenter2011237/2/20116062945193.2206062945193.22Invalid#TemporaryNumberInvalidN/A
7CallCenter2011237/2/201160688138101.973060688138101.973Invalid#TemporaryNumberInvalidN/A1111111111
8Web2011237/2/201160703961164.992060703961164.992Invalid#TemporaryNumberInvalidN/A1111111111
Sheet2
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
A phone number should only show up if it shows up in 2011, 2010, and 2009
... that's not a filtering type of request. That's more like what people do with SQL ... maybe one of the SQL experts out there can construct a query that does this ( and you could run it through MS Query on your data ).
 
Upvote 0
At G2 G3 and G4 use >0
This assumes that the phone number is a number.

Regards

Brad

There is no need to use the = sign before the year. just 2009 etc
 
Upvote 0
At G2 G3 and G4 use >0
This assumes that the phone number is a number.

Regards

Brad

There is no need to use the = sign before the year. just 2009 etc
That'll give any phone numbers in those years ... I believe the OP wants to see only numbers that occur in all years.
 
Upvote 0
Thanks for the replies, I was thinking about that last night and was thinking the same thing that it isn't really a filtering question. I ended up just setting up a table with some COUNTIFS and got the values, and then put the unique items into a new table. Thanks for checking and your recommendations though.
 
Upvote 0
Hi Guys

Here is a possible solution with advanced filter


Sub MyFilter()

Range("C10:G25").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"E2:E3"), CopyToRange:=Range("I10"), Unique:=True
Range("C10").Select

End Sub


Regards

Brad
Excel Workbook
ABCDEFGHIJ
1Change years as requiredCriteria is E2:E3
2Fiscalyear
32009FALSE
42010
52011
6
7
8TableAnswer
9
10FiscalyearInitialRevenueQuantityDeletedOrderPhonePhone
11200814
12200943
1320105
1420111
1520082
1620092
1720104
1820115
1920113
2020094
2120103
2220085
2320114
242008
2520093
26
27
Filter
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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