Link to home
Start Free TrialLog in
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?
Avatar of Steven Harris
Steven Harris
Flag of United States of America image

Filter > Custom Filter

Equals 732???????
Avatar of 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").
Similar to ThinkSpaceSolutions suggestion:

AutoFilter > Begins with 732
Avatar of brothertruffle880

ASKER

I tried "begins with 732" and "=732"  and got blanks as a result (i.e. nothing).
ASKER CERTIFIED SOLUTION
Avatar of Steven Harris
Steven Harris
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial