Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

excel 2010 - Filtering area codes and phone numbers

Posted on 2014-01-12
5
Medium Priority
?
1,341 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 33

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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

730 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