Solved

excel 2010 - Filtering area codes and phone numbers

Posted on 2014-01-12
5
1,048 Views
Last Modified: 2014-01-16
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?
0
Comment
Question by:brothertruffle880
5 Comments
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39775515
Filter > Custom Filter

Equals 732???????
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39775520
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
 
LVL 32

Expert Comment

by:Rob Henson
ID: 39776298
Similar to ThinkSpaceSolutions suggestion:

AutoFilter > Begins with 732
0
 

Author Comment

by:brothertruffle880
ID: 39781689
I tried "begins with 732" and "=732"  and got blanks as a result (i.e. nothing).
0
 
LVL 18

Accepted Solution

by:
Steven Harris earned 500 total points
ID: 39782113
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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question