Solved

excel 2010 - Filtering area codes and phone numbers

Posted on 2014-01-12
5
1,010 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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 …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now