Solved

excel 2010 - Filtering area codes and phone numbers

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

740 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