Avatar of brothertruffle880
brothertruffle880Flag for United States of America asked on

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?
Microsoft Excel

Avatar of undefined
Last Comment
Steven Harris

8/22/2022 - Mon
Steven Harris

Filter > Custom Filter

Equals 732???????
Joe Howard

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").
Rob Henson

Similar to ThinkSpaceSolutions suggestion:

AutoFilter > Begins with 732
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER
brothertruffle880

I tried "begins with 732" and "=732"  and got blanks as a result (i.e. nothing).
ASKER CERTIFIED SOLUTION
Steven Harris

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question