Cleaning Up Lists

Written by Allen Wyatt (last updated April 6, 2024)
This tip applies to Excel 97, 2000, 2002, and 2003


Larry works for a firm that does outbound calls to potential customers. The firm has downloaded the national Do-Not-Call list, and wants to check their targeted phone numbers against the list, so they can make sure they don't call anyone that is on the DNC list. He was wondering how this can be done in Excel.

First of all, the natural question is whether Excel is even the proper tool to use for such a task. In checking information at the Federal Trade Commission's Web site, it appears that the DNC list, which is a flat text file, can consist of either phone numbers in individual area codes or a file that contains all area codes. Quick calculations indicate that the average area code list has in excess of 300,000 phone numbers, with over 120,000,000 phone numbers nationwide.

Working with such large quantities of phone numbers in Excel is not only impractical, but virtually impossible--Excel will only handle up to 65,536 rows of data. A better solution would be to use some sort of database program (perhaps Access), which can work with much larger numbers of records. You could also search the Web for proprietary solutions that will work with the DNC list.

Assuming that you work with just a subset of the DNC list, and that it will all fit within your copy of Excel, then it is a relatively easy task to compare one list against another. This assumes that the data in your DNC list and the "need to check" list are in the same text format. For the sake of this example, assume as well that the DNC list is in column A, and the "need to check" list is in column C. You can then follow these steps:

  1. Select the cell in column D that is just to the right of the first phone number you want to check in column C.
  2. Enter the following formula in the selected cell:
     =ISNA(MATCH(C2,$A:$A,0))
  • Copy the formula down so it is beside all the numbers you want to check in column C.
  • The results of the formula indicate whether the adjoining phone number is in the DNC list or not. If the result is TRUE, then the phone number is not in the DNC list; a result of FALSE means it is in the DNC list and should not be called. At this point you can easily sort the "need to check" list according to the results of the formula in column D. You can then delete all the phone numbers for which the value in column D is FALSE.

    ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2319) applies to Microsoft Excel 97, 2000, 2002, and 2003.

    Author Bio

    Allen Wyatt

    With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

    MORE FROM ALLEN

    Stubborn Foreign Languages

    Word is a program designed to work in and with multiple languages. This can lead to some problems, however, for those ...

    Discover More

    Copying Formatting

    Excel provides a couple of different ways to copy formatting from one cell to another. Perhaps the easiest way is to use ...

    Discover More

    Changing Characters on Keyboard Keys

    Want to assign some fancy characters to keyboard keys for characters you seldom use? There are a couple of ways you can ...

    Discover More

    Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

    More ExcelTips (menu)

    Fixing the Decimal Point

    Don't want to always type the decimal point as you enter information in a worksheet? If you are entering information that ...

    Discover More

    Sequentially Inputting Information

    When entering data in a worksheet, you may only want to add information to the cells in a particular range. You can ...

    Discover More

    Copying Between Instances of Excel

    Copying information between two instances of Excel is different than copying information between two worksheets opened in ...

    Discover More
    Subscribe

    FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

    View most recent newsletter.

    Comments

    If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

    What is two more than 7?

    There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


    This Site

    Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

    Newest Tips
    Subscribe

    FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

    (Your e-mail address is not shared with anyone, ever.)

    View the most recent newsletter.