+ Reply to Thread
Results 1 to 4 of 4

Return a Metro City after matching a mailing city with a suburb

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    TX
    MS-Off Ver
    Excel 2016
    Posts
    6

    Return a Metro City after matching a mailing city with a suburb

    Hi, I'm trying to match a suburb city with its Metro area city, what I'll call the "Market City." I've got the names of the Market City as headers (I1:T1) with their suburbs listed below. I can't figure out a formula that will index/search/match the mailing city to the suburb and return the Market City. I was able to use nested IF functions for a lot of the large markets, but that doesn't take care of everything.

    Is this possible or do I need a Macro? In column H, you can see the formulas I've tried; I thought a reverse lookup might be the way. There are also a few duplicates; I'm not sure how to incorporate those. I've also replaced the blank cells in the Market array (I2:T24) with spaces.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,371

    Re: Return a Metro City after matching a mailing city with a suburb

    Maybe put this on H2 and copied down as necessary

    =IFERROR(INDEX($I$1:$T$1,SUMPRODUCT(($I$2:$T$24=$D2)*COLUMN($I$2:$T$24))-COLUMN($I$2)+1),"")

  3. #3
    Registered User
    Join Date
    03-20-2014
    Location
    TX
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Return a Metro City after matching a mailing city with a suburb

    That worked! Thanks so much! Now I just have to study it so I understand how it works.

  4. #4
    Registered User
    Join Date
    03-20-2014
    Location
    TX
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Return a Metro City after matching a mailing city with a suburb

    Actually, before I close this thread, what's the best way to account for duplicates? If I have a Highland Park, TX and a Highland Park, IL (need to add in to the Sample file I uploaded), the formula returns blank.

+ 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. Replies: 8
    Last Post: 10-16-2017, 03:08 AM
  2. Replies: 3
    Last Post: 02-07-2016, 03:58 AM
  3. Matching street and city of two tables
    By great_AS in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-16-2015, 12:15 AM
  4. Matching State City Zip Code Pattern before transposing to corresponding cell
    By sandy1977 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2014, 10:37 PM
  5. Calculating Shipment Rates Base on Origin City and Destination City
    By Chnatko in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-09-2014, 11:11 AM
  6. Calculating City to City -road miles
    By williesmith2008 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2012, 05:19 AM
  7. extract city using city list lookup
    By terrysoper1973 in forum Excel General
    Replies: 1
    Last Post: 09-07-2011, 01:43 PM

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