Solved

excel 2010 - Filtering area codes and phone numbers

Posted on 2014-01-12
5
966 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 26

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 31

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

744 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

13 Experts available now in Live!

Get 1:1 Help Now