+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Match two columns of data

  1. #1
    Registered User
    Join Date
    04-21-2010
    Location
    Omaha, Nebraska
    MS-Off Ver
    Excel 2007
    Posts
    2

    Match two columns of data

    Hello, (first post!)

    In Column A, I have zip codes of visitors to our local museum. In Column B, I have a list of every zip code in the country.

    How do I find matches?

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Match two columns of data

    To what end?
    Do you want the location for the ZIPS in the A column?
    Do you just want to see if particular ZIPs in the B column have had a visitor?

    If the former (assuming city is in the C column)
    Please Login or Register  to view this content.
    If the latter,
    Please Login or Register  to view this content.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match two columns of data

    In column C

    =Isnumber(Match(B1,A:A,0))

    This will look for zipcode from B1 in column A and return TRUE if it exists (meaning zipcode has visitied).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    04-21-2010
    Location
    Omaha, Nebraska
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Match two columns of data

    It was the latter & the formula worked. Thank you! I guess if I put some context around what I'm doing, it might make more sense.

    I'm assisting on an economic impact study to see how many people & where they come from, visit our local children's museum. I have list of about 16K zip codes in Column A, some zips are listed multiple times because we had multiple visitors from that city.

    In Column B, I have the zip code for every city in the country.

    What I'm trying to figure out, is how many people are coming from each zip code in Column A.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Match two columns of data

    In that case I would use a COUNTIF() formula.

    =COUNTIF(rangeofvisitorzipcodes, onezipcodeinlist)

    So in C2:
    =COUNTIF(A:A, B2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Match two columns of data

    How about this one then - it will give you a count by zip code
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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