excel 2010 - Filtering area codes and phone numbers

I have cells with phone numbers
2015551212
I would only like to see phone numbers in area code 732.
How can I do this using filter?
brothertruffle880Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Steven HarrisConnect With a Mentor PresidentCommented:
Can you upload a sample workbook?

Using random data, "732???????" works.  It will only show data that fits the format, where the number starts with "732" and "?" can be any number.  This is similar to "732*", where "*" can be any series of numbers or text.
0
 
Steven HarrisPresidentCommented:
Filter > Custom Filter

Equals 732???????
0
 
MacroShadowCommented:
Several options.

1. Create a new column, set formula to =Left(A1,3) (assuming the phone numbers are in column A and start in the first row, adjust if necessary) and drag down as far as necessary. Then you can filter on that column.

2. Using vba:
Range("YourRange").Columns(1).AutoFilter Field:=1, Criteria1:="=732*", VisibleDropDown:=False

Open in new window

Again this is assuming that the phone numbers are in column A (if not change .Columns(1) to the proper column index).
Range("YourRange") is a named range but you could use any range i.e. Range("A1:A250").
0
 
Rob HensonFinance AnalystCommented:
Similar to ThinkSpaceSolutions suggestion:

AutoFilter > Begins with 732
0
 
brothertruffle880Author Commented:
I tried "begins with 732" and "=732"  and got blanks as a result (i.e. nothing).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.