+ Reply to Thread
Results 1 to 2 of 2

Counting How Many Times Range of Numbers (ZIP Codes) Appears Within Another Range(Full Add

  1. #1
    Registered User
    Join Date
    12-25-2014
    Location
    El Segundo, CA
    MS-Off Ver
    2013
    Posts
    1

    Counting How Many Times Range of Numbers (ZIP Codes) Appears Within Another Range(Full Add

    Hi Guys,

    Any help on this would be greatly appreciated. I've been searching the Internet for a few hours on how to accomplish the below scenario and have been unsuccessful (I may just not know what the correct terms to search for are). Here it is:

    Say I have a column (A) in my spreadsheet with full addresses, for instance:

    A2= Aaron Rodgers, 123 Packers St., Green Bay, WI 10001-0001
    A3= LeBron James, Cleveland Cavs, 23 King St., Cleveland, OH 10003-1325
    etc.

    Then I have another column (B) with ZIP Codes like:

    B2= 10001
    B3= 10002
    B4= 10003
    etc.

    What my goal is is to count how many of the full addresses from A contain one of the ZIP codes from B. I have attached a sample spreadsheet to hopefully make it easier. sample.xlsx

    I've tried quite a few different things with counts and wildcards but the closest I can get is using this long formula I found on another forum:

    =SUMPRODUCT((LEN(range of addresses)-LEN(SUBSTITUTE(range of addresses,cell with ZIP code,"")))/LEN(cell with ZIP code)) - The problem with this is that you need to do this formula for each cell with the ZIP code and I have about 1,000 ZIP codes to work with, which is not feasible.

    If this matters, in the actual spreadsheet I have the data is on separate sheets within the workbook with about 10K addresses and about 1,000 ZIP Codes.

    Again, any help would be great! I really appreciate this community as you all provide such great information.

    Thanks in advance.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Counting How Many Times Range of Numbers (ZIP Codes) Appears Within Another Range(Full

    Try this in C2 and copy down

    =COUNTIF(A:A,"*"&B2&"*")

    Row\Col
    A
    B
    C
    1
    Address Zip Codes
    2
    Aaron Rodgers, 123 Packers St., Green Bay, WI 10001-0001
    10001
    1
    3
    LeBron James, Cleveland Cavs, 23 King St., Cleveland, OH 10003-1325
    10002
    0
    4
    Los Angeles Dodgers, 1 Stadium Way, Los Angeles, CA 10004-9999
    10003
    1
    5
    10004
    1
    6
    10005
    0
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Counting how many times a range of key words come up in a range of cells
    By Piepongwong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-04-2014, 02:38 PM
  2. [SOLVED] Counting the number of times a time appears in a range of data
    By alexw1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2013, 12:23 PM
  3. Counting the number of times a range of values appears in a table.
    By mikenola in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-19-2010, 12:52 PM
  4. Count how many times a number appears within a range of two numbers
    By Maristar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2009, 10:56 AM
  5. Replies: 0
    Last Post: 08-25-2005, 05:44 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1